{"id":22362075,"url":"https://github.com/vrcca/json_path_access","last_synced_at":"2025-07-30T14:32:27.013Z","repository":{"id":46882573,"uuid":"515301531","full_name":"vrcca/json_path_access","owner":"vrcca","description":"Converts JSONPath selectors into Access selectors","archived":false,"fork":false,"pushed_at":"2023-05-05T13:51:26.000Z","size":25,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-15T10:12:57.913Z","etag":null,"topics":["elixir-lang","hacktoberfest","json-path"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/vrcca.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-18T18:40:19.000Z","updated_at":"2024-05-12T10:30:49.720Z","dependencies_parsed_at":"2024-05-12T10:30:48.760Z","dependency_job_id":"19da7888-a95f-43e2-97e9-aae08f7c2650","html_url":"https://github.com/vrcca/json_path_access","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrcca%2Fjson_path_access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrcca%2Fjson_path_access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrcca%2Fjson_path_access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrcca%2Fjson_path_access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrcca","download_url":"https://codeload.github.com/vrcca/json_path_access/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228150437,"owners_count":17877296,"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":["elixir-lang","hacktoberfest","json-path"],"created_at":"2024-12-04T16:39:24.205Z","updated_at":"2024-12-04T16:39:25.133Z","avatar_url":"https://github.com/vrcca.png","language":"Elixir","readme":"# JsonPathAccess\n\nThis library converts JSONPath expressions into Access list. This is really useful when you want to use it with `get_in/2`, `drop_in/2`, etc.\n\n\n## Example\n\nAssuming we have this JSON:\n```json\n{\n  \"store\": {\n    \"book\": [\n      {\n        \"category\": \"reference\",\n        \"author\": \"Nigel Rees\",\n        \"title\": \"Sayings of the Century\",\n        \"price\": 8.95\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"Evelyn Waugh\",\n        \"title\": \"Sword of Honour\",\n        \"price\": 12.99\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"Herman Melville\",\n        \"title\": \"Moby Dick\",\n        \"isbn\": \"0-553-21311-3\",\n        \"price\": 8.99\n      },\n      {\n        \"category\": \"fiction\",\n        \"author\": \"J. R. R. Tolkien\",\n        \"title\": \"The Lord of the Rings\",\n        \"isbn\": \"0-395-19395-8\",\n        \"price\": 22.99\n      }\n    ],\n    \"bicycle\": {\n      \"color\": \"red\",\n      \"price\": 19.95\n    }\n  }\n}\n\n```\n\nYou could access some fields using JSONPath selectors:\n\n```elixir\njson_path = JsonPathAccess.to_access(\"$.store.bicycle.price\")\nget_in(json, json_path)\n\njson_path = JsonPathAccess.to_access(\"$.store.book[1]['category']\")\nget_in(json, json_path)\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `json_path_access` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:json_path_access, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/json_path_access\u003e.\n\n## TODO\n\nThis library attempts to implement this version of the spec: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-05.html\n\n- [x] Root Selector\n- [x] Dot Selector\n- [x] Dot Wildcard Selector\n- [x] Index Selector\n- [x] Index Wildcard Selector\n- [x] Array Slice Selector\n  - Note: Currently there is no support for negative steps.\n- [ ] Filter Selector\n- [ ] Descendant Selector\n- [ ] List Selector\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrcca%2Fjson_path_access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrcca%2Fjson_path_access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrcca%2Fjson_path_access/lists"}