JSONLint is an online JSON validator and formatter. It will check your JSON for syntax errors and format it with proper indentation and line breaks to make it more human-readable (this can be very handy when analysing complex JSON documents). You can either paste your JSON data in the form or enter a URL and have JSONLint fetch it automatically.

There’s a whole bunch of different JSON editors available, but JsonEditorOnline.org is easily the best one I’ve seen. It displays JSON as a hierarchical tree and lets you add, remove and duplicate fields, re-arrange them via drag & drop, change field type, and so on. The interface is intuitive and well thought out.

When you open a JSON document in the browser, most browsers will either offer to download the file or display it as plain text. To make working with JSON more convenient, you can install a JSON viewer add-on that will display JSON documents with syntax highlighting and proper indentation:

Have you ever wished JSON was more like XML? Probably not. But if you have – JSON Schema is for you. It lets you define the structure of your JSON document, specify validation rules, documentation, references (hyperlinks) and so on. Given a JSON document with a schema, you can then use a JSON validator like JSV to validate it. See also: JSON Schema validator for PHP.

JSONSelect is a powerful CSS-like selector language for JSON documents. You can use it to extract information from complex JSON structures without having to explicitly navigate the object hierarchy. Here are a few example selectors to whet your appetite:

.foo .bar – select all nodes with the key bar that have an ancestor with the key foo.

.foo :last-child – select the last child node of the foo object.

:has(.lang:val("Spanish")) > .level – select the level node of all objects that contain a lang field with the value “Spanish”.

jLinq is a JavaScript library that lets you run complex queries on JSON arrays. It provides a fluent interface (like jQuery) that you can use to filter your data, extract the fields you need and sort the results. jLinq does have one drawback: the library hasn’t been updated in a while, and might no longer be maintained.

Underscore-CLI is the swiss-army knife of JSON processing. This command-line tool can do anything from basic pretty-printing to running arbitrary JavaScript or CoffeeScript. You can filter JSON documents, extract specific properties, apply arbitrary transformations to values (map/reduce/reduceRight), fill in missing properties with defaults, and much, much more. Underscore-CLI also supports the JSONSelect selector syntax mentioned above.

Search

This site uses cookies to improve your experience, to personalize ads and to analyze traffic. It also shares information about your use of this site with social media, advertising and analytics partners. By using this site, you agree to its use of cookies. AcceptSee Details