{"id":22472203,"url":"https://github.com/ckampfe/jindex","last_synced_at":"2025-06-15T16:35:29.574Z","repository":{"id":48354861,"uuid":"216425438","full_name":"ckampfe/jindex","owner":"ckampfe","description":"Index JSON values by their paths in a document for easy grepping","archived":false,"fork":false,"pushed_at":"2023-03-26T19:10:40.000Z","size":360,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T17:51:15.192Z","etag":null,"topics":["command-line-tool","gron","index","json"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckampfe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-20T20:47:56.000Z","updated_at":"2024-05-13T04:21:15.000Z","dependencies_parsed_at":"2024-12-06T12:22:48.219Z","dependency_job_id":null,"html_url":"https://github.com/ckampfe/jindex","commit_stats":{"total_commits":167,"total_committers":2,"mean_commits":83.5,"dds":0.0119760479041916,"last_synced_commit":"6a87819f75a910e7d07700bdde498a8b41b99cf5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ckampfe/jindex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fjindex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fjindex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fjindex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fjindex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckampfe","download_url":"https://codeload.github.com/ckampfe/jindex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fjindex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260009041,"owners_count":22945401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","gron","index","json"],"created_at":"2024-12-06T12:12:37.613Z","updated_at":"2025-06-15T16:35:29.536Z","avatar_url":"https://github.com/ckampfe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jindex\n\nEnumerate the paths through a JSON document,\nwith an output that is API-compatible with [gron](https://github.com/tomnomnom/gron)\n\n[![Rust](https://github.com/ckampfe/jindex/actions/workflows/rust.yml/badge.svg)](https://github.com/ckampfe/jindex/actions/workflows/rust.yml)\n\n## Installation\n\nLatest stable release from crates.io:\n\n```\n$ cargo install jindex\n```\n\nLatest unstable (HEAD) release from source:\n\n```\n$ cargo install --git https://github.com/ckampfe/jindex\n```\n\n## Examples\n\nYou can pass JSON through stdin:\n\n```\n$ echo '{\n  \"a\": 1,\n  \"b\": 2,\n  \"c\": [\"x\", \"y\", \"z\"],\n  \"d\": {\"e\": {\"f\": [{}, 9, \"g\"]}}\n}' | jindex\n\njson.d.e.f[2] = \"g\";\njson.d.e.f[1] = 9;\njson.d.e.f[0] = {};\njson.c[2] = \"z\";\njson.c[1] = \"y\";\njson.c[0] = \"x\";\njson.b = 2;\njson.a = 1;\n```\n\nor from a file:\n\n```\n$ jindex myfile.json\n\njson.d.e.f[2] = \"g\";\njson.d.e.f[1] = 9;\njson.d.e.f[0] = {};\njson.c[2] = \"z\";\njson.c[1] = \"y\";\njson.c[0] = \"x\";\njson.b = 2;\njson.a = 1;\n```\n\nWith the [json_pointer](https://datatracker.ietf.org/doc/html/rfc6901) format option:\n\n```\n$ jindex -fjson_pointer myfile.json\n/d/e/f/2        \"g\"\n/d/e/f/1        9\n/d/e/f/0        {}\n/c/2    \"z\"\n/c/1    \"y\"\n/c/0    \"x\"\n/b      2\n/a      1\n```\n\nWith the `json` format option:\n\n```\njindex -fjson myfile.json\n{\"path_components\":[\"d\",\"e\",\"f\",2],\"value\":\"g\"}\n{\"path_components\":[\"d\",\"e\",\"f\",1],\"value\":9}\n{\"path_components\":[\"d\",\"e\",\"f\",0],\"value\":{}}\n{\"path_components\":[\"c\",2],\"value\":\"z\"}\n{\"path_components\":[\"c\",1],\"value\":\"y\"}\n{\"path_components\":[\"c\",0],\"value\":\"x\"}\n{\"path_components\":[\"b\"],\"value\":2}\n{\"path_components\":[\"a\"],\"value\":1}\n```\n\n## Command-line interface\n\n```\n$ jindex -h\njindex 0.8.2\nEnumerate the paths through a JSON document\n\nUSAGE:\n    jindex [OPTIONS] [json-location]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -f, --format \u003cformat\u003e    gron, json_pointer, json [default: gron]\n\nARGS:\n    \u003cjson-location\u003e    A JSON file path\n\n```\n\n## Path output order\n\n`jindex` makes *no guarantees at all* about the order in which paths are output.\nPaths may appear depth-first, breadth-first, or any other order at all relative to their position in the input JSON document.\nFurther, *any ordering is not guaranteed to be stable from one version to the next*,\nas it may change to aid the implementation of new optimizations.\nIf a stable order is important, I recommend using `sort` or some other after-the-fact\nmechanism, as the set of paths output from a given input document are guaranteed\nto be stable over time.\n\n## Performance\n\nTo run the benchmarks:\n\n```\n# install the benchmark runner\n$ cargo install cargo-criterion\n```\n\n```\n# clone the project\n$ git clone https://github.com/ckampfe/jindex\n```\n\n```\n# run the benchmarks\n$ cd jindex\n$ cargo criterion\n```\n\n## Features\n\n`jindex` uses [jemalloc](http://jemalloc.net/) by default for a substantial increase in throughput.\nIf you do not wish to use jemalloc, you can build without it by passing the `--no-default-features` flag to Cargo.\n\n## Version policy\n\n`jindex` remains pre-1.0 and as such does not guarantee API compatibility from one version to the next. That said, `jindex` has a very small API, and is not likely to change markedly in the future. Reaching a 1.0 version is a project goal but not one I consider more important than others. If this is a problem or if you have questions please open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckampfe%2Fjindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckampfe%2Fjindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckampfe%2Fjindex/lists"}