{"repo":"tidwall/gjson","free":true,"listed":false,"github":"https://github.com/tidwall/gjson","clone":"git clone https://github.com/tidwall/gjson.git","description":"Get JSON values quickly - JSON parser for Go","language":"Go","stars":15551,"topics":["json","golang","json-parser"],"license":"MIT","category":"cli-tools","readme_excerpt":"get json values quickly 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, and parsing json lines. Also check out SJSON for modifying json, and the JJ command line tool. This README is a quick overview of how to use GJSON, for more information check out GJSON Syntax. GJSON is also available for Python and Rust The official Git repository is at Codeberg. Getting Started =============== Installing To start using GJSON, install Go and run go get : This will retrieve the library. Get a value Get searches json for the specified path. A path is in dot syntax, such as \"name.last\" or \"age\". When the value is found it's returned immediately. This will print: There's also GetBytes for working with JSON byte slices. Path Syntax Below is a quick overview of the path syntax, for more complete information please check out GJSON Syntax. A path is a series of keys separated by a dot. A key may contain special wildcard characters '\\ ' and '?'. To access an array value use the index as the key. To get the number of elements in an array or to access a child path, use the '#' character. The dot and wildcard characters can be escaped with '\\\\'. You can also query an array for the first match by using #(...) , or find all matches with #(...)# . Queries support the == , != , , = comparison operators and the simple pattern matching % (like) and !% (not like) operators. Please note th","default_branch":null,"files":null,"tree":[],"storefront":"/r/tidwall","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tidwall/gjson/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}