JSON (JavaScript Object Notation) is a light-weight, text-based language for data interchange. The technology is often used for serializing and transmitting structured data over a network connection and therefore is commonly used in AJAX, Web 2.0, and Web services applications.
XMLSpy provides numerous JSON editing tools. With support for JSON, JSON5, JSON Lines, and JSON with Comments (JSONC) it allows you to view and edit documents using the same intuitive text code editor and grid / tree view that are available for XML editing, with useful editing guides and entry helpers. The software also makes it easy to convert XML to JSON or convert JSON to XML.
Unlike other tools, XMLSpy supports both JSON and XML, offering you an easy way to work with JSON data in the same environment where you're developing XML, AJAX, and Web services applications, giving you the best of both worlds.
XMLSpy also includes an easy to use, graphical JSON Schema editor for developing, validating, and generating schemas. To get started, you can generate a sample JSON instance from any JSON Schema. Then, continue viewing and editing the document in text or tree view as described below.
XMLSpy includes a JSON Viewer and JSON Editor. The JSON editor includes JSON Grid, which offers a graphical representation of the document structure that is immediately easier to understand than the corresponding code in text view, especially for long, complex documents with multiple nested levels of arrays and objects. JSON Grid also has powerful editing features including:
JSON Grid makes it easy to modify or reorganize the structure of the document using drag-and-drop. Active buttons in each cell provide shortcuts for the most common display, filtering, and editing tasks. During editing, these buttons make it fast to add a child item, change a type, toggle between table and list view, and so on.
For faster editing, XMLSpy auto-detects string, number, boolean, and null values as you type. Other types can be manually selected within the cell.
JSON Grid Editor has numerous easy-to-remember keyboard shortcuts to make editing as fast as possible, letting you continue typing without needing to use your mouse. A right-click context menu is also available so you can edit using your preferred approach.
When there is a JSON Schema associated with your JSON document, Grid View provides auto-completion based on that schema as you type, and data types are automatically determined based on the schema as well.
JSON Grid includes table view that groups data under the same array or object for easy understanding and quick editing, and you can toggle between the two displays, for instance:
Support for XQuery filters and formulas lets you use XQuery 3.1 expressions to filter the components that are displayed in the view and calculate results that can be stored in the document.
Each table includes a filter that lets you manipulate the display of object and arrays. For example, in the screenshot above, a filter has been applied to an array so that only those tracks written by Brian May are displayed. It's easy to toggle between filtered and unfiltered cells by clicking the filter icon. When you save the file, your filters are stored in metadata for later viewing purposes. They don’t affect the content of the document.
A formula enables you to generate output (nodesets as well as calculations) and to display the output in Grid View. Below is an example using an XQuery formula to calculate the price of items. Clicking the save icon for the formula gives you the option to store the output of the formula in the JSON document. In this way, formulas in XMLSpy JSON Grid open an entirely new possibility: the ability to have dynamically computed content in JSON documents.
In addition to utilizing XQuery for formulas in JSON Grid, you can use it to create charts from numerical JSON data.
After configuring a chart function, the save icon embeds the chart in the file as a base-64 encoded image. Additionally, the developer can right-click on the chart in Grid View and save it in an image file such as .png or .jpg.
The text-based JSON file editor provides syntax coloring, line numbering, source folding, bookmarking, and more, making it easy to navigate and understand your JSON code, and find and edit strings. When you enable intelligent editing on the JSON tab of the Info window, the Elements entry helper window provides a dynamically built list of the elements present in your JSON document. You can insert an element from the Elements window by double clicking it, or by dragging it into your document in the editing pane.
Syntax checking and JSON Schema-based validation guide you in making valid edits. Any errors are listed in the multi-tabbed Messages window, which also includes a hyperlink to the error in your document and the related schema, making trouble-shooting very straightforward.
JSON5 is an extension of JSON that adds some ECMAScript 5 extensions. A strict subset of JavaScript, JSON5 works with all existing JSON content. Here are a few differences between JSON and JSON5:
By default, XMLSpy recognizes files with the .json file extension as JSON instance documents, and those with the .json5 file extension as JSON5 instance documents.
XMLSpy also supports JSON Lines (JSONL) and JSON with Comments (JSONC) documents for editing and validation.
JSON Lines is a text format for storing structured data where each record is on its own line and each individual line is a valid object. This allows records to be processed one at a time, which makes the format very useful for exporting and sending data.
The JSON with Comments format was introduced to allow comments in any JSON document. While comments are already supported in JSON5, the .JSONC format allows for comments in previous versions of JSON documents.
XMLSpy provides built-in tools for converting JSON and XML. This allows you to, for example, quickly convert an XML file to JSON for transport with JavaScript, or convert data received in JSON format to valid XML. You can opt to convert a single file or perform a mass JSON-to-XML conversion in the Project window.
Converting XSD to JSON Schema is also supported.
The software provides complete support for querying JSON with XPath/XQuery and transforming JSON to HTML and other formats with XSLT.
Unlike basic online tools, this JSON editor download for Windows gives you all the advanced JSON tools described above, in one version. Takes just a few minutes to install the JSON editor software and start your free trial. There is no credit card required to activate your fully functional, 30-day trial.