davesnx / query-json

Faster, simpler and more portable implementation of `jq` in Reason

Home Page:https://query-json.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a summarized print json helper

davesnx opened this issue · comments

Currently this is the output:

Error:  Trying to map on an object.

Recived value:
        {"name":"@davesnx/query-json","version":"0.3.1","description":"faster and simpler re-implementation of jq in Reason Native","author":"davesnx <dsnxmoreno@gmail.com>","license":"MIT","homepage":"https://github.com/davesnx/query-json","keywords":["reason","ocaml","jq","json","reason-native","menhir","cli"],"bugs":{"url":"https://github.com/davesnx/query-json/issues"},"repository":{"type":"git","url":"https://github.com/davesnx/query-json.git"},"scripts":{"q":"esy dune exec q","build":"esy dune build -p query-json","start":"esy dune build --watch","test":"esy dune exec test/Run.exe","format":"esy b dune build @fmt --auto-promote --root ."},"esy":{"build":"dune build -p query-json","buildsInSource":"_build","buildEnv":{"ODOC_SYNTAX":"re"},"release":{"bin":["q"]}},"devDependencies":{"@esy-ocaml/reason":"~3.6.0","@opam/bisect_ppx":"2.4.1","@opam/dune":"^2.7.0","@opam/menhir":"20200624","@opam/ppx_deriving":"4.5","@opam/sedlex":"2.2","@opam/yojson":"1.7.0","@reason-native/console":"^0.1.0","@reason-native/rely":"^3.2.1","ocaml":"4.10.0","@opam/ocaml-lsp-server":"github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#c1e51a50a85aacf2bf0479e7c8f8fd1a9fc977c2","@opam/cmdliner":"1.0.4","bats":"^1.1.0"}}

With the summarized json should be:

Doing am array operation on an object:

Error:  Trying to map on an object.

Recived value:
        {
			"name": [...],
			"version": [...],
			"description": [...],
			"author": [...],
			[...]
		}

Doing a key on an array:

Error:  Trying to access "key" on an array.

Recived value:
        ["1", "2", "3", ...]

Published under 0.3.5