Thanks. That's a nice tool.
But I like to use the editor to do JSON stuff.
I was going to make a highlighter and I didn't.
It would be pretty easy, though.
Although you could probably just use JavaScript highlighting
in a pinch, as better than nothing.
Here is an online highlighter and formatter:
http://jsonsh.com/
It could use a little better highlighting than that.
I think square brackets and braces should be different colors
to make them stand out more. And commas.
I would also make the quotes a different color from the
quoted text.
I've also seen some nice suggestions, like:
Make strings using single quotes show as errors.
Here's some JSON to try in it:
Code: Select all
{
"firstName": "John",
"lastName": "Smith",
"age": 25,
"alive": true,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
}
This site lets you view syntax highlighted HTML, and offers the user
the ability to choose what syntax highlighting scheme to use.
http://json-rpc.org/prefs/pygments
That would be a nice option for RJTE someday, the ability to name
highlighting schemes and offer them and allow their use and
installation and then let the user choose which scheme they want.
So, for example, as in the above page, people could publish
their different named highlighting schemes and the user could
choose the one they want to use.
The Chrome browser has addons that do syntax highlighting and maybe
formatting. Firefox probably has something like that, too.
http://www.londatiga.net/it/four-best-c ... ding-json/
And there are some nice JavaScript highlighter programs that let you highlight code
on web pages now, but most of them are fairly slow, especially for code of
any real size.
http://softwaremaniacs.org/soft/highlight/en/