Thanks for `source-highlight`, it is fast and easy to customize.
I am working on a tool that required highlighting of JSON documents printed to a terminal so I wrote a JSON language implementation[1] and style file[2].
It appears to function correctly but I would appreciate it if you could review and if it is deemed good enough merge into the next release?
It handles escaped strings correctly, ie:
{
"string": "my \"quoted\" value"
}
I wanted to be able to differentiate elements at a granular level so have introduced some JSON specific style names:
* keyquote - Quotation marks for keys
* valquote - Quotation marks for string values
* colon - The colon delimiter
* key - The string between key quotes
The number handling is taken from number.lang and can be replaced with an include of number.lang if you wish to merge this language definition.
Cheers,
--
mischa (aka muji).