NetBeans 7.4 JSON Support
Join the DZone community and get the full member experience.
Join For FreeNetBeans 7.4 provides enhanced JSON support. The code folding and Navigator window support are demonstrated in a code listing for a simple Person.json
file and how that code appears in the screen snapshots below.
Person.json
{ "person": { "firstName" : "Fred", "lastName" : "Flintstone", "city" : "Bedrock" } }
The utility of being able to see the JSON in a tree-like manner in the Navigator and to code fold portions of the JSON is more obvious with more complex JSON. The next code listing and associated screen snapshots of that code in NetBeans 7.4 is based on JSON Example.
Glossary.json
{ "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" } } } } }
Even though proper indenting can go along way toward making JSON more readable, the visual cues provided by the Navigator Window in NetBeans 7.4 make it even easier to see the relationships of nested data in a JSON file. The code folding also allows one to minimize desired levels of nested name/value pairs to be able to focus on whatever portion is needed at a given time. JSON is increasingly popular because of advantages inherent in this simple name/value format, but NetBeans 7.4 provides tooling that makes JSON even easier to use.
Published at DZone with permission of Dustin Marx, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Five Java Books Beginners and Professionals Should Read
-
Cypress Tutorial: A Comprehensive Guide With Examples and Best Practices
-
Top 10 Pillars of Zero Trust Networks
-
Clear Details on Java Collection ‘Clear()’ API
Comments