The advantages of JSON as a lightweight, interoperable data format have secured its place as a favored mechanism for serializing and transporting data on the web. However, most applications still benefit from or require validation of client-submitted data. Enter the JSON Schema spec, which lets you describe the structure of JSON data for a particular application, for both documentation and validation purposes.
Though JSON Schema code is by design human-readable, building a complex schema with nested and repeating sections in a text-only editor becomes time consuming and error-prone quickly. Let’s look at five ways a graphical editor is a must-have for JSON Schema development.
There are myriad ways that an enterprise-grade, graphical JSON Schema editor is an asset for developers. Here are the top 5:
- Faster development and fewer errors with graphical views, drag-and-drop design, and intelligent entry helpers
- Developers new to JSON Schema can rapidly build a schema using the graphical view
- Allows for incremental data modeling, by which you generate a JSON Schema based on an existing JSON instance
- Built-in XML to JSON conversion tools make it easy to move between formats as required
- Auto-generated, visual JSON Schema documentation facilitates maintenance and communication
Altova built JSON Schema support in the XMLSpy XML and JSON editor around these five requirements, offering support for JSON Schema draft-04, draft-06, and draft-07.
Advantages of a Graphical JSON Schema Editor
Structured as a set of nested containers – much like XML Schema – JSON Schema by nature lends itself to a graphical view. Approaching a schema visually allows for rapid development and visualization of structure. Compare the visual representation below to its corresponding text-only code.
Even for a relatively simple JSON Schema, a graphical view of the data model is easier to define and understand.
As you’re working, drag and drop editing and intelligent entry helpers make it easy to specify details and constraints and make valid JSON Schema editing choices.
If you’re familiar with the XML Schema editor in XMLSpy, the JSON Schema Editor will be an instant friend. At the same time, its graphical editing paradigm makes it easy to grasp for those new to XMLSpy.
Generate a JSON Schema
It’s not necessary to start at the beginning by defining a schema from scratch. For incremental data modeling, simply load a JSON instance and let XMLSpy generate the JSON Schema for you. You can refine it further in the graphical JSON Schema editor or use it immediately for documentation of the data structure and/or data validation.
The JSON Schema generator dialog allows you generate a schema conforming to:
- JSON Schema draft-04
- JSON Schema draft-06
- JSON Schema draft-07
Convert XML to JSON
Another benefit of using an enterprise-grade editor is support for additional related technologies. For instance, developers can generate a JSON Schema from an existing XML Schema (XSD) with two clicks in XMLSpy.
JSON Schema to XSD conversion is also supported.
With support for JSON Schema editing, validation, conversion, and intelligent editing of JSON instances, XMLSpy provides an enterprise-grade approach to JSON development that lets you capitalize on its advantages even more readily.
Additional JSON Schema Tools
JSON Schema draft-04, draft-06, and draft-07 are supported across the Altova product line with graphical tools and built-in automation options that make JSON development and data integration easy. In addition to XMLSpy, JSON Schema support is provided for:
- JSON data mapping and conversion in MapForce. A graphical, drag-and-drop data mapping tool, MapForce lets developers and IT pros process and convert data between JSON, XML, CSV, Excel, databases, and other formats. Convert data instantly, or automate the data mapping via MapForce Server.
- Lightning-fast JSON validation on RaptorXML Server. Process high-volume or recurrent JSON Schema-based validation jobs using this high-performance validator for JSON, XML, and XBRL.
To cover all your JSON Schema development and conversions needs, you can choose the Altova MissionKit product suite, which includes XMLSpy and MapForce at a special price. MissionKit and RaptorXML Server are available for a free, 30-day trial.