Please sign in to access this page
A no-fuss web app to validate, beautify and minify JSON and XML.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
so... its been a couple months huh
so, i tried adding JSON support! that's awesome.. right? it was pain. i tried to write a json parser... in json. reason being: dealing with invalid json, or other types of json (json5, jsonc... etc) and either fixing it or keeping it formatted.
turns out, i got burned out super easily doing that.. as you can see i spent a long time on it, with not much to show. so, i've decided to take a simpler approach. first, it tries to use the built-in json parser, and then use the .stringify
function to format it. obviously, this isn't great (i can't offer any settings...), and the syntax needs to be PERFECT. so, what if it isnt? it'll fall back to a stupid formatter. this formatter simply figures out if something should be indented or not based on how many {
or [
there are... it works... but it's only a fallback.
I added some configuration settings for the library I'm using to the UI and switched my bundler to Vite (I was using Parcel before and it was causing me some issues with legacy browsers [yeah i care about some of them] so i pivoted)
It also supports the minification feature of xml-formatter
! So the XML part of this has reached minimum viable product. Time to move onto json...
Started off by making a quick site using Bootstrap to quickly get a prototype going, most of my programming time is me trying to bundle it without relying on a third-party cdn haha.
I also began on building the XML section of the site. For this I'm using a couple textarea
s and an NPM module called xml-formatter
that nicely formats the XML (I did find I had to change the defaults to make it appealing to me but that shouldnt matter when I add an options section later) and in the future I'll allow for minifying (which this library also does!) so hopefully it all turns out good.