{"repo":"itchyny/gojq","free":true,"listed":false,"github":"https://github.com/itchyny/gojq","clone":"git clone https://github.com/itchyny/gojq.git","description":"Pure Go implementation of jq","language":"Go","stars":3795,"topics":["golang","go","cli-tool","cli-utility","json"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"gojq Pure Go implementation of jq This is an implementation of jq command written in Go language. You can also embed gojq as a library to your Go products. Usage Nice error messages. Installation Homebrew mise Zero Install Build from source Docker Difference to jq - gojq is purely implemented with Go language and is completely portable. jq depends on the C standard library so the availability of math functions depends on the library. jq also depends on the regular expression library and it makes build scripts complex. - gojq does not keep the order of object keys. I understand this might cause problems for some scripts but basically, we should not rely on the order of object keys. Due to this limitation, gojq does not have keys unsorted function and --sort-keys ( -S ) option. I would implement when ordered map is implemented in the standard library of Go but I'm less motivated. - gojq supports arbitrary-precision integer calculation while jq does not; jq loses the precision of large integers when calculation is involved. Note that even with gojq, all mathematical functions, including floor and round , convert integers to floating-point numbers; only addition, subtraction, multiplication, modulo, and division operators (when divisible) keep the integer precision. To calculate floor division of integers without losing the precision, use def idivide($n): (. - . % $n) / $n; . To round down floating-point numbers to integers, use def ifloor: floor tostring tonumber; , but note tha","default_branch":null,"files":null,"tree":[],"storefront":"/r/itchyny","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/itchyny/gojq/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."}