Over a million developers have joined DZone.

JSON Info Management and Publishing for Technical and Business Users

See how one web app delivery tool, Hivemind, can also manage JSON for your users, which should help ease the burden and bridge the gap between dev and user.

· Integration Zone

Build APIs from SQL and NoSQL or Salesforce data sources in seconds. Read the Creating REST APIs white paper, brought to you in partnership with CA Technologies.

Like it or not, JSON is the data format of the web at the moment. It has found uses in application configuration, taxonomy management, and pretty much any domain that used to be handled by XML is now increasingly being taken over by JSON.

While our Hivemind product is first and foremost a web application delivery platform, it doubles as a full-blown Structured Information Manager and Publisher for JSON information. Both technical and non-technical users can use it to create and publish complex structured information without writing code.

Hivemind has a sophisticated Smart Object technology that can be used to create complex objects that are then serialized as JSON.

About Smart Objects

  • Smart Objects are an executable construct on the Hivemind platform, in executable form the file format is itself JSON. You can see an example of a Smart Object executable here.
  • Smart Objects can invoke other Smart Objects in the way that any executable construct (eg. a PHP file) should be able to invoke another executable.
  • Smart objects can be invoked in code (eg. Groovy, JavaScript, Closure, Ruby) and the resulting complex object is a composite made up of Java Objects and ArrayLists. You can use them in your code just like any other object.
  • Smart Objects can be secured in a number of ways:
    • Fields can be marked as final to prevent browser supplied overrides.
    • They can be restricted to only be invoked by another smart object — in other words, not invokable directly from the browser.
    • You can apply role-based security as in any Java application. You actually define roles using a smart object.
  • Smart Objects are composed using the file system structure. In other words, you can organize a filesystem folder structure that mirrors your structured information. This is very intuitive and makes it easy to think about your JSON information.

Smart Objects in Action

Below is an example of a Smart Object setup for the AWS IP list (https://ip-ranges.amazonaws.com/ip-ranges.json). You can imagine that IP list could be maintained by anyone, they don't need to even know what JSON is.

1)A simple Smart Object representing an AWS IP

Image title

2) Smart Object prefixes property invokes another Smart Object, thus leading to composition.

Image title

3)Secure a Smart Object

Image title

4) Test result from executing the Smart Object, it results in JSON.

Image title

Some Benefits

Developers can offload management of JSON information to business users: Often, developers rely on information that is managed by business users, or at least that should be managed by business or non-technical users. For instance, a developer building an e-commerce site would need to get information from a product catalog. A developer may need some taxonomy managed by someone else who's non-technical. In order for developers to work together with non-technical users requires the non-technical user mucking about with complex JSON or XML files, increasing the risk of breaking applications when they make simple syntax mistakes.

The Integration Zone is brought to you in partnership with CA Technologies.  Use CA Live API Creator to quickly create complete application backends, with secure APIs and robust application logic, in an easy to use interface.

json,json api,json to java object

Published at DZone with permission of Edmond Kemokai. 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 }}