If you're trying to convert markdown documents into webpages, the most likely output format would surely be HTML, or perhaps something custom to the site like MediaWiki markup.
It's totally possible that a site would allow for new documents to be uploaded in a JSON format, but the format would have to be specified (e.g. which keys are used for the post body and subject) - so "whatever you deem best" is unlikely to work, it would need to be "whatever my webhost expects, which is documented -here-"
I'm happy to be wrong here, and zainhoda's markdown to JSONified HTML is interesting regardless - but I suspect you really wanted a markdown to HTML converter. ex: https://markdowntohtml.com/ or something more extreme like a static site generator: https://www.getzola.org/
I left the decision to him because why interfere with someone else who probably has a stronger handle on their own strengths. As for your webhost concern, I can always change webhosts.
Live App: https://markdown-to-json.pycob.app/
Source Code: https://github.com/pycob/prototypes/blob/main/markdown-to-js...