Hi all,
First, thanks for a terrific editor.
Is there a way to pretty format json files? Right now such files are 1 wrapped line, pretty impossible to inspect meaningfully. It would just[*] be a matter of slapping some \n after a , and indenting based on brace/bracket match level. I think.
As for colorization, the wiki on json has been duly noted, but it doesn't really help much as the string key isn't differentiated from the string value in the key/value pair. Perhaps a json key could be a string followed by a : as a new definition. This isn't as important as wrapping anyway.
Amazingly, there is really a dearth of linux editors that (I've found) is able to format json. (Web based is out, eclipse with a plugin can do it but that's no way to go for casual file inspection, command line isn't it either).
Thanks.
* ;D
On 14-08-23 08:50 AM, alta88[nntp] wrote:
Hi all,
First, thanks for a terrific editor.
Is there a way to pretty format json files? Right now such files are 1 wrapped line, pretty impossible to inspect meaningfully. It would just[*] be a matter of slapping some \n after a , and indenting based on brace/bracket match level. I think.
Attached is a simple Python script that will do it. Use it with Custom Commands[0] and it will format (valid) JSON for you.
Cheers, Matthew Brush
[0]: http://www.geany.org/manual/current/index.html#sending-text-through-custom-c...