Over a million developers have joined DZone.

NetBeans 7.4 JSON Support

· Java Zone

Discover how powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience, brought to you in partnership with JetBrains

NetBeans 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.


      "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": {
        "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.

Learn more about Kotlin, a new programming language designed to solve problems that software developers face every day brought to you in partnership with JetBrains.


Published at DZone with permission of Dustin Marx, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}