News for hackers. Stuff that matters.
Re:Ask HN: What simple web apps do you wish existed? Seeking... by zainhoda on Sunday March 05, 2023 @09:34AM (#35029898)
That's a great idea! Is there a specific JSON format you'd need?
Re:Ask HN: What simple web apps do you wish existed? Seeking... by RollAHardSix on Sunday March 05, 2023 @10:04AM (#35030180)
The candle shines the light on my ignorance, JSON is JSON to me. Use whatever you deem best if you decide to pursue this!
Re:Ask HN: What simple web apps do you wish existed? Seeking... by zainhoda on Sunday March 05, 2023 @10:22AM (#35030340)
How does this look? I'm happy to make changes to suit your needs:

Live App: https://markdown-to-json.pycob.app/

Source Code: https://github.com/pycob/prototypes/blob/main/markdown-to-js...

Re:Ask HN: What simple web apps do you wish existed? Seeking... by RollAHardSix on Sunday March 05, 2023 @06:00PM (#35035148)
Slick nice!
Re:Ask HN: What simple web apps do you wish existed? Seeking... by ashishsingal on Monday March 06, 2023 @07:17AM (#35040139)
holy! 42 lines of code - love it!
Re:Ask HN: What simple web apps do you wish existed? Seeking... by k1t on Sunday March 05, 2023 @12:36PM (#35031845)
This one smells a bit like something I run into at work sometimes, where a non-technical person makes a technical decision and the technical people don't sufficiently challenge it.

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/

Re:Ask HN: What simple web apps do you wish existed? Seeking... by RollAHardSix on Sunday March 05, 2023 @05:56PM (#35035112)
Not necessarily. With the push towards headless development, using JSON to fill content opens up layout options significantly. Being tied to pre-made HTML runs you into significant issues trying to do anything that isn't just markdown page presented with HTML.

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.