[Geany-Users] JSON formatter in Geany
Matthew Brush
mbrush at xxxxx
Sat Aug 23 19:36:21 UTC 2014
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-commands
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jsonfmt.py
Type: text/x-python
Size: 219 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20140823/71df490c/attachment.py>
More information about the Users
mailing list