This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently in NB6.1 we have the minimal JSON support. In fact, JSON documents are treated as Javascript. For 6.5 we want to take this to the next level. Some features could be: - Syntax checking - Formatting - Navigation - Create javascript expressions from json data format - Bundle json to java libs for java support - Diff for json - Get meta data from XMLHttpRequest call and create expressions that could be used in javascript
Currently names are highlighted as strings which isn't that useful. I filed issue 118250 with a patch that would highlight the names within JSON files differently to the string values. It is worth noting that whilst JSON is defined as having names being quoted, many implementations are tolerant of the case when the quotes aren't used. It would be good if the missing quotes could be optionally tolerated.
With some recent changes fromm Tor, Fold and Navigator is now available for 6.5. I'm not sure if we'll have enough time for syntax checking. After some discussions with Tor, we were thinking of making it as a hints/quickfix. In the mean while, I'll take a look at the syntax coloring, that may be easy to fix.
For syntax coloring here is my proposal (very similar to XML): 1. For name/value pair(e.g. "title": "example glossary"), name in green and value in orange. Similar to attribute name/value in XML. 2. Have the enclosing object literal (such as the "glossary" and "GlossDiv") in blue similar to an XML element. Here is the sample to help us discuss: { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": { "para": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML"] }, "GlossSee": "markup" } } } } }