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

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

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.



Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

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 }}