jq - Command-line JSON processor

  •        128

jq is a lightweight and flexible command-line JSON processor. jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.

http://stedolan.github.io/jq/
https://github.com/stedolan/jq

Tags
Implementation
License
Platform

   




Related Projects

yq - Command-line YAML and XML processor - jq wrapper for YAML/XML documents

  •    Python

Before using yq, you also have to install its dependency, jq. See the jq installation instructions for details and directions specific to your platform. Use the --width/-w argument to pass the line wrap width for string literals. All other command line arguments are forwarded to jq. yq forwards the exit code jq produced, unless there was an error in YAML parsing, in which case the exit code is 1. See the jq manual for more details on jq features and options.

jsonpipe - Convert JSON to a UNIX-friendly line-based format.

  •    Python

Everyone I know prefers to work with JSON over XML, but sadly there is a sore lack of utilities of the quality or depth of html-xml-utils and XMLStarlet for actually processing JSON data in an automated fashion, short of writing an ad hoc processor in your favourite programming language. jsonpipe is a step towards a solution: it traverses a JSON object and produces a simple, line-based textual format which can be processed by all your UNIX favourites like grep, sed, awk, cut and diff. It may also be valuable within programming languages---in fact, it was originally conceived as a way of writing simple test assertions against JSON output without coupling the tests too closely to the specific structure used.

jl - Functional sed for JSON

  •    Haskell

jl ("JSON lambda") is a tiny functional language for querying and manipulating JSON. Binary releases for Linux and OS X are available here.

underscore-cli - Command-line utility-belt for hacking JSON and Javascript.

  •    Javascript

JSON is an excellent data interchange format and rapidly becoming the preferred format for Web APIs. Thusfar, most of the tools to process it are very limited. Yet, when working in JavaScript, JSON is fluid and natural. Or it can form the backbone of a rich, full-powered JavaScript command-line, inspired by "perl -pe", and doing for structured data what sed, awk, and grep do for text.


Jackson JSON - JSON Parser in Java

  •    Java

Jackson is a multi-purpose Java library for processing JSON data format. This project contains core low-level incremental ("streaming") parser and generator abstractions used by Jackson Data Processor. It also includes the default implementation of handler types (parser, generator) that handle JSON format.

JSON-Splora - GUI for editing, visualizing, and manipulating JSON data

  •    Javascript

JSON-Splora is a GUI for editing, visualizing, and manipulating JSON data with jq or JavaScript. The editor is a JavaScript editor, and the input is parsed as json5. This allows for comments as well as a relaxed JSON input format. Once the editor has valid JSON, an input window will appear below, allowing you to manipulate the object with JavaScript or jq. A panel will appear to the right with the output, and updates live as the input or filter changes.

json - A "json" command for massaging JSON on your Unix command line.

  •    Javascript

A "json" command for massaging JSON on your Unix command line.

fastjson - Fast JSON Processor

  •    Java

Fastjson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Fastjson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.

fast-xml-parser - Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback

  •    Javascript

This project welcomes contributors. If you have a feature you'd like to see implemented or a bug you'd liked fixed, the best and fastest way to make that happen is to implement it and submit a PR. Basic knowledge of JS is sufficient. Feel free to ask for any guidance. To use it from CLI Install it globally with -g option.

pikkr - JSON parser which picks up values directly without performing tokenization in Rust

  •    Rust

Pikkr is a JSON parser which picks up values directly without performing tokenization in Rust. This JSON parser is implemented based on Y. Li, N. R. Katsipoulakis, B. Chandramouli, J. Goldstein, and D. Kossmann. Mison: a fast JSON parser for data analytics. In VLDB, 2017. This JSON parser performs well when there are a limited number of different JSON structural variants in a JSON data stream or JSON collection, and that is a common case in data analytics field.

json - A "json" command for massaging JSON on your Unix command line.

  •    Javascript

See http://trentm.com/json for full docs and examples as a man page.Follow @trentmick for updates to json.

Noggit - JSON streaming parser

  •    Java

Noggit is the world's fastest streaming JSON parser for Java. It is used in Apache Solr.

jquery.terminal - jQuery Terminal Emulator

  •    Javascript

jQuery Terminal Emulator is a plugin for creating command line interpreters in your applications. It can automatically call JSON-RPC service when a user types commands or you can provide you own function in which you can parse user commands. It's ideal if you want to provide additional functionality for power users. It can also be used to debug your application. You can create an interpreter for your JSON-RPC service with one line of code (just use url as first argument).

GJSON - JSON Parser for Go

  •    Go

GJSON is a Go package that provides a fast and simple way to get values from a json document. It has features such as one line retrieval, dot notation paths, iteration.

jsonstreamingparser - A JSON streaming parser implementation in PHP.

  •    PHP

This is a simple, streaming parser for processing large JSON documents. Use it for parsing very large JSON documents to avoid loading the entire thing into memory, which is how just about every other JSON parser for PHP works. For more details, I've written up a longer explanation of the JSON streaming parser that talks about pros and cons vs. the standard PHP JSON parser.

jstream - Streaming JSON parser for Go

  •    Go

jstream is a streaming JSON parser and value extraction library for Go.

djson - Fast Go decoder for dynamic JSON

  •    Go

DJSON is a JSON decoder for Go that is 2~ to 3~ times faster than the standard encoding/json and the existing solutions, when dealing with arbitrary JSON payload. See benchmarks below. It is a good approach for people who are using json.Unmarshal together with interface{}, don't know what the schema is, and still want good performance with minimal changes.While searching for a JSON parser solution for my projects, that is faster than the standard library, with zero reflection tests, allocates less memory and is still safe(I didn't want the "unsafe" package in my production code, in order to reduce memory consumption). I found that almost all implemtations are just wrappers around the standard library and aren't fast enough for my needs. I encountered two projects: ujson that is the UltraJSON implementation and jsonparser, that is a pretty awesome project. ujson seems to be faster than encoding/json but still doesn't meet my requirements. jsonparser seems to be really fast, and I even use it for some of my new projects. However, its API is different, and I would need to change too much of my code in order to work with it. Also, for my processing work that involves ETL, changing and setting new fields on the JSON object, I need to transform the jsonparser result to map[string]interface{} and it seems that it loses its power.