@Mudassir-Raza said in Help for a JSON formatting.:
That JSON snippet looks fine — it’s just not indented properly, so it’s hard to read.
And has syntax errors, since there are four arrays and two objects which are not properly terminated.
You can format JSON in a few ways:
In Notepad++, install the JSON Viewer plugin (as you already did).
Or the JsonTools plugin mentioned above. I tried both on the original data: JSON Viewer refused to format it, because of the syntax errors. JsonTools warned about the syntax errors, but then made its best guess to close off the arrays and objects and then formatted it.
Or, if you just want something quick in the browser, try a free online JSON viewer — it shows tree view and highlights errors instantly.
This is a Notepad++ forum. Unless Notepad++ has no way of doing it, and especially for first-time posters, it is frowned upon suggesting external tools. And since both JSON Viewer and JsonTools can help with that messy data, to some extent, there is no reason to advertise external tools – they both have error detection, they both have pretty-printers, and they both have tree-view panels available, which covers all the features you mentioned of the website, so I can see no good reason to bring up that site.
Given that the conversation was a year old, and the only new information you added was the advertisement for an external website, I was tempted to ban you as a spammer. And since I’m still not convinced that website traffic isn’t the only reason you posted, I am de-linkifying your post. Anyone who is curious about the site you’ve advertised will still be able to figure out where it is, but it will prevent automatic crawlers from wasting site bandwidth here as a redirect to the site you advertised.