Although JSON might be necessary at times, for this, I think that what you did with markdown-importer works well.
---
title: "TestPage"
another:
foo: 1
bar: 2
baz: 3
---
## Content
becomes
title: TestPage
another.foo: 1
another.bar: 2
another.baz: 3
!! Content ##
Of course there are potential issues if the keys contain .'s, but I think it’s mostly a reasonable approach. That’s clearly related to my alternative API above.