(Importing this from linguist on Github)
I'd like to add support for a slight modification of the JSON lexer - that of JSON snippets, where surrounding braces or brackets are allowed to be missing.
In other words, doing this:
"first_name": "Jefferson", "nicknames": ["Jeff", "Bob"], "last_name": "Brown", "middle_name": "B.", "name_suffix": null
This is a pattern I use in READMEs and API documentation, when I want to discuss pieces of an object at a time.
Would others find this useful? What's the easiest way to go about doing this? Is there a way to "subclass" the existing JSON lexer and tweak the rules?