Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

NetBeans 7.4 JSON Support

DZone's Guide to

NetBeans 7.4 JSON Support

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

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.

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.



Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.

Topics:

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

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}