{"id":27743049,"url":"https://github.com/kjozsa/jsp","last_synced_at":"2025-04-28T16:54:48.759Z","repository":{"id":57438225,"uuid":"426657211","full_name":"kjozsa/jsp","owner":"kjozsa","description":"command line JSONPath processing tool (like `jq` but using JSONPath syntax)","archived":false,"fork":false,"pushed_at":"2021-11-16T11:49:21.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T07:07:02.230Z","etag":null,"topics":["command-line","command-line-tool","json","jsonpath","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kjozsa.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":"2021-11-10T14:39:25.000Z","updated_at":"2024-09-09T04:09:59.000Z","dependencies_parsed_at":"2022-08-29T03:01:33.225Z","dependency_job_id":null,"html_url":"https://github.com/kjozsa/jsp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjozsa%2Fjsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjozsa%2Fjsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjozsa%2Fjsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjozsa%2Fjsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjozsa","download_url":"https://codeload.github.com/kjozsa/jsp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251350987,"owners_count":21575754,"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","command-line-tool","json","jsonpath","python"],"created_at":"2025-04-28T16:54:48.010Z","updated_at":"2025-04-28T16:54:48.753Z","avatar_url":"https://github.com/kjozsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JSONPath command line tool with syntax highlight and formatting\n_it's like `jq`, but using JSONPath syntax_\n\n### Install / upgrade\nUse the standard python package manager: \n`pip install -U jsp`\n\n### Basic examples\n\n```shell\n$ cat sample.json | jsp $.store.bicycle.color\n\"red\"\n\n$ cat sample.json | jsp $.store.book[*].title\n\"Sayings of the Century\"\n\"Sword of Honour\"\n\"Moby Dick\"\n\"The Lord of the Rings\"\n\n$ cat sample.json | jsp -f $..book[2]   # -f for formatting the output\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$ cat sample.json | jsp $..book[?(@.category='fiction')].isbn\n\"0-553-21311-3\"\n\"0-395-19395-8\"\n```\n\nSimply parse JSON input without specifying a JSONPath expression (also handles multiple JSON objects from stdin):\n```shell\ncat sample-multi.json | jsp\n{\"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": \"Sayings of the Century\", \"price\": 8.95}\n{\"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99}\n{\"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": \"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99}\n{\"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99}\n```\n\n### Usage instructions\n```\nusage: jsp [-h] [-c | --color | --no-color] [-f | --format | --no-format] [-i INDENT] [-v] [jsonpath]\n\njsp v0.8.6 - Process a JSONPath expression over a JSON read from \u003cstdin\u003e.\n\npositional arguments:\n  jsonpath              valid jsonpath expression\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c, --color, --no-color\n                        enable/disable colored highlights (default: True)\n  -f, --format, --no-format\n                        enable/disable formatting output (default: False)\n  -i INDENT, --indent INDENT\n                        number of spaces for indent on formatting\n  -v, --version         show program's version number and exit\n\n```\n\n### About the name\nOriginally the name of this project was meant to be JPT as JsonPath Tools, but PyPI had a same-named obsolete package. Therefore, this will now run by the name JSP - hopefully noone remembers Java Server Pages anymore anyway 😀 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjozsa%2Fjsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjozsa%2Fjsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjozsa%2Fjsp/lists"}