{"id":16677230,"url":"https://github.com/greyblake/jsonpath-rs","last_synced_at":"2025-09-14T13:13:22.871Z","repository":{"id":62441396,"uuid":"115567202","full_name":"greyblake/jsonpath-rs","owner":"greyblake","description":"JSONPath for Rust","archived":false,"fork":false,"pushed_at":"2018-09-13T21:04:17.000Z","size":92,"stargazers_count":38,"open_issues_count":7,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-25T08:04:14.197Z","etag":null,"topics":["filter","json","json-data","json-parser","jsonpath","rust","rust-lang","rust-library","traverse","xpath"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greyblake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-28T00:06:24.000Z","updated_at":"2025-02-07T10:45:50.000Z","dependencies_parsed_at":"2022-11-01T21:51:15.529Z","dependency_job_id":null,"html_url":"https://github.com/greyblake/jsonpath-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/greyblake/jsonpath-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyblake%2Fjsonpath-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyblake%2Fjsonpath-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyblake%2Fjsonpath-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyblake%2Fjsonpath-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greyblake","download_url":"https://codeload.github.com/greyblake/jsonpath-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyblake%2Fjsonpath-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264152559,"owners_count":23564946,"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":["filter","json","json-data","json-parser","jsonpath","rust","rust-lang","rust-library","traverse","xpath"],"created_at":"2024-10-12T13:25:40.092Z","updated_at":"2025-07-07T22:08:46.482Z","avatar_url":"https://github.com/greyblake.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSONPath for Rust\n\nThe library is in hard development stage.\n\n[![Build Status](https://travis-ci.org/greyblake/jsonpath-rs.svg?branch=master)](https://travis-ci.org/greyblake/jsonpath-rs)\n\n\n## Example\n\n```rust\nextern crate jsonpath;\nextern crate serde_json;\n\nuse jsonpath::Selector;\nuse serde_json::Value;\n\nfn main() {\n    let jsondoc = r#\"\n        {\n             \"books\": [\n                 {\n                     \"title\": \"Der schwarze Obelist\",\n                     \"author\": \"Erich Maria Remarque\"\n                 },\n                 {\n                     \"title\": \"Le mur\",\n                     \"author\": \"Jean-Paul Sartre\"\n                 }\n             ]\n        }\n    \"#;\n\n    // Parse JSON document\n    let json: Value = serde_json::from_str(jsondoc).unwrap();\n\n    // Create a JSONPath selector\n    let selector = Selector::new(\"$.books.*.title\").unwrap();\n\n    // Apply the selector to the JSON and convert Vec\u003c\u0026Value\u003e into Vec\u003c\u0026str\u003e\n    let titles: Vec\u003c\u0026str\u003e = selector.find(\u0026json)\n        .map(|t| t.as_str().unwrap())\n        .collect();\n\n    assert_eq!(titles, vec![\"Der schwarze Obelist\", \"Le mur\"]);\n}\n```\n\n## Roadmap\n\n* [ ] Operators:\n  * [x] `$` - root element\n  * [x] `.\u003cname\u003e` - named child element\n  * [x] `*` - wildcard (any child item)\n  * [x] `[\u003cnumber\u003e]` - indexed element in array\n  * [x] `[\u003cstart\u003e:\u003cend\u003e]` - slice\n  * [x] `[:\u003cend\u003e]` - slice (to)\n  * [x] `[\u003cstart\u003e:]` - slice (from)\n* [ ] Handy test helpers\n* [ ] Good integration test coverage\n* [ ] Benchmarks\n* [ ] Refactor\n* [ ] Improve error messages\n* [ ] Review unwraps\n* [ ] Review the public API (rename Selector -\u003e Path ?)\n* [ ] Publish a new version\n* [ ] Mutable iterator\n* [x] Support filters\n  * [x] `[?(\u003cexpression\u003e)]` - Filter expression. Expression must evaluate to a boolean value.\n  * [x] `@` - current element\n  * [x] operator `==`\n  * [x] operator `!=`\n  * [x] operator `\u003e`\n  * [x] operator `\u003c`\n  * [x] operator `\u003e=`\n  * [x] operator `\u003c=`\n  * [ ] operator `=~`\n  * [x] filter comparison with expression on the right side `[?(\u003cexporession\u003e \u003coperator\u003e \u003cexpression\u003e)]`\n  * [x] string\n  * [x] float\n  * [x] integer\n  * [x] array of string\n  * [ ] array of float\n  * [ ] array of number\n  * [ ] sub script expression `()`\n  * [ ] and operator `\u0026\u0026`\n  * [ ] or operator `||`\n\n## Supported Rust versions\n\nJsonpath requires rust version 1.26 or higher.\n\n## License\n\n[MIT](https://github.com/greyblake/jsonpath-rs/blob/master/LICENSE) © [Sergey Potapov](http://greyblake.com)\n\n## Contributors\n\n- [greyblake](https://github.com/greyblake) Sergey Potapov - creator, maintainer.\n- [MarcAntoine-Arnaud](https://github.com/MarcAntoine-Arnaud) Marc-Antoine ARNAUD - filters support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreyblake%2Fjsonpath-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreyblake%2Fjsonpath-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreyblake%2Fjsonpath-rs/lists"}