{"id":13760792,"url":"https://github.com/nichtich/jq-jsonpointer","last_synced_at":"2025-11-08T04:05:17.646Z","repository":{"id":138803614,"uuid":"185353993","full_name":"nichtich/jq-jsonpointer","owner":"nichtich","description":"jq module implementing JSON Pointer (RFC 6901)","archived":false,"fork":false,"pushed_at":"2020-04-07T06:51:12.000Z","size":7,"stargazers_count":17,"open_issues_count":3,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-10T10:49:54.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JSONiq","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/nichtich.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}},"created_at":"2019-05-07T08:12:43.000Z","updated_at":"2024-12-27T11:19:23.000Z","dependencies_parsed_at":"2024-01-15T03:57:26.736Z","dependency_job_id":"a1b7d500-f8fa-4268-b1e3-bdfa3b7fa253","html_url":"https://github.com/nichtich/jq-jsonpointer","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/nichtich%2Fjq-jsonpointer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtich%2Fjq-jsonpointer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtich%2Fjq-jsonpointer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichtich%2Fjq-jsonpointer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichtich","download_url":"https://codeload.github.com/nichtich/jq-jsonpointer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247278504,"owners_count":20912746,"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":[],"created_at":"2024-08-03T13:01:22.080Z","updated_at":"2025-11-08T04:05:17.589Z","avatar_url":"https://github.com/nichtich.png","language":"JSONiq","readme":"# jq-jsonpointer\n\n[![Build Status](https://travis-ci.org/nichtich/jq-jsonpointer.svg?branch=master)](https://travis-ci.org/nichtich/jq-jsonpointer)\n\n\u003e jq module implementing JSON Pointer (RFC 6901)\n\nThis git repository contains an implementation of JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) as module for the [jq data transformation language](https://stedolan.github.io/jq/).\n\n## Table of Contents\n\n* [Install](#install)\n* [Usage](#usage)\n* [API](#api)\n  * [pointer](#pointerjson_pointer)\n  * [pointer_get](#pointer_gettokens)\n  * [pointer_tokens](#pointer_tokens)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Install\n\nInstallation requires [jq](https://stedolan.github.io/jq/) version 1.5 or newer.\n\nPut `jsonpointer.jq` to a place where jq can [find it as module](https://stedolan.github.io/jq/manual/#Modules).\n\nOne way to do so is to download the current version of the file:\n\n~~~sh\nmkdir -p ~/.jq \u0026\u0026 git clone https://github.com/nichtich/jq-jsonpointer.git ~/.jq/jsonpointer\n~~~\n\nOr check out this repository to directory `~/.jq/jsonpointer/`:\n\n~~~sh\nmkdir -p ~/.jq \u0026\u0026 wget -N https://github.com/nichtich/jsonpointer/raw/master/jsonpointer.jq\n~~~\n\n## Usage\n\nSee [jq manual](https://stedolan.github.io/jq/manual/#Modules) how to use jq modules in general and API description below how to use this module.\n\n## API\n\n### pointer(json_pointer)\n\nReturns a filter compiled from a given JSON Pointer. For instance given a JSON file `input.json`:\n\n~~~json\n{\"foo\":[{\"/\":42}]}\n~~~\n\nThe value `42` can be accessed with JSON Pointer syntax like this:\n\n~~~sh\n$ jq 'include \"jsonpointer\"; pointer(\"/foo/0/~1\")' input.json\n42\n~~~\n\nCharacter `-` to index the (nonexisting) member after the last array element is\nnot supported. If the JSON Pointer does not correspond to an existing element,\nthe filter returns `null` instead of throwing an error.\n\n### pointer_get(tokens)\n\nSame as [pointer](#pointerjson_pointer) but expects the JSON Pointer given as array of tokens:\n\n~~~sh\n$ jq 'include \"jsonpointer\"; pointer_get([\"foo\",\"0\",\"/\"]\")' input.json\n42\n~~~\n\n### pointer_tokens\n\nMaps a JSON Pointer string to its tokens as array of strings.\n\n~~~sh\n$ jq -n 'include \"jsonpointer\"; \"/foo/0/~1\" | pointer_tokens'\n[\n  \"foo\",\n  \"0\",\n  \"/\"\n]\n~~~\n\n## Contributing\n\nThe source code is hosted at \u003chttps://github.com/nichtich/jq-jsonpointer\u003e.\n\nBug reports and feature requests [are welcome](https://github.com/nichtich/jq-jsonpointer/issues/new)!\n\n## License\n\nMade available under the MIT License by Jakob Voß.\n\n","funding_links":[],"categories":["JSONiq"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichtich%2Fjq-jsonpointer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichtich%2Fjq-jsonpointer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichtich%2Fjq-jsonpointer/lists"}