On 30/07/10 at 6:16 PM -0700, Justin Leavens
<jlea...@gmail.com> wrote:
>Is there an option or plugin in BBEdit to reformat a JSON document
>like there is for HTML (using the Markup:Utilities:Format option)?
JSON is basically just javascript data, so a javascript
formatter should work. A quick google search shows a few JSON
formatters as well:
<http://www.google.com/search?q=JSON%20format>
I seem to recall a BBEdit filter which formatted code via an
online site for another language (can't recall which one). You
can probably use that as a guide for writing filter to format
JSON via one of the online solutions.
You could also use (eg) a perl module in a filter to format:
<http://search.cpan.org/~miki/Hoppy-0.01005/lib/Hoppy/Formatter/JSON.pm>
<http://search.cpan.org/~makamaka/JSON-2.21/lib/JSON.pm>
I have no idea though what the resulting data looks like from a
tool like that.
Charlie
--
Ꮚ Charlie Garrison ♊ <garr...@zeta.org.au>
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠 http://www.ietf.org/rfc/rfc1855.txt