{"id":22540603,"url":"https://github.com/dolmen-go/jsonptr","last_synced_at":"2025-10-19T00:28:46.548Z","repository":{"id":57480847,"uuid":"69822502","full_name":"dolmen-go/jsonptr","owner":"dolmen-go","description":"JSON Pointer (RFC 6901) for Go","archived":false,"fork":false,"pushed_at":"2024-03-28T01:01:18.000Z","size":81,"stargazers_count":30,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T23:36:13.046Z","etag":null,"topics":["go","golang","golang-module","golang-package","json-pointer","rfc6901"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/dolmen-go/jsonptr","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dolmen-go.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}},"created_at":"2016-10-02T21:14:21.000Z","updated_at":"2024-08-28T06:27:32.000Z","dependencies_parsed_at":"2024-03-28T01:45:30.106Z","dependency_job_id":"1cafac0c-f0ee-43c5-9ef5-44e2139d53ee","html_url":"https://github.com/dolmen-go/jsonptr","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/dolmen-go%2Fjsonptr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fjsonptr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fjsonptr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fjsonptr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dolmen-go","download_url":"https://codeload.github.com/dolmen-go/jsonptr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119439,"owners_count":21050754,"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":["go","golang","golang-module","golang-package","json-pointer","rfc6901"],"created_at":"2024-12-07T12:11:37.751Z","updated_at":"2025-10-19T00:28:41.511Z","avatar_url":"https://github.com/dolmen-go.png","language":"Go","readme":"# jsonptr - JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) for Go\n\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/dolmen-go/jsonptr)\n[![codecov](https://codecov.io/gh/dolmen-go/jsonptr/branch/master/graph/badge.svg?token=tdH8IAOTo7)](https://codecov.io/gh/dolmen-go/jsonptr)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dolmen-go/jsonptr)](https://goreportcard.com/report/github.com/dolmen-go/jsonptr)\n\n## Features\n\nGoals:\n\n1. First-class interface\n    * Idiomatic\n    * Short\n    * Complete\n    * Structured errors, not just strings: [`BadPointerError`](https://godoc.org/github.com/dolmen-go/jsonptr#BadPointerError), [`PtrError`](https://godoc.org/github.com/dolmen-go/jsonptr#PtrError), [`DocumentError`](https://godoc.org/github.com/dolmen-go/jsonptr#DocumentError)\n    * Working at JSON data model level (tree of `[]interface{}`, `map[string]interface{}`) as well as serialized JSON ([`json.RawMessage`](https://golang.org/pkg/encoding/json/#RawMessage), [`json.Decoder`](https://golang.org/pkg/encoding/json/#Decoder))\n2. Correctness (most existing open source Go implementations have limitations in their interface or have implementation bugs)\n    * Full testsuite (work in progress)\n    * Reject invalid escapes (regexp `/~[^01]/`)\n    * Allow any JSON value as leaf node\n    * Allow any JSON value as root (not just a `map[string]interface{}`)\n    * Allow to get/set the root of the document with the empty pointer `\"\"`\n3. Speed (see [benchmark](https://github.com/dolmen-go/jsonptr-benchmark))\n    * No reflect\n    * Optimised parsing\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/dolmen-go/jsonptr\"\n)\n\nfunc main() {\n    // JSON: { \"a\": [ 1 ] }\n    document := map[string]interface{}{\n        \"a\": []interface{}{\n            1,\n        },\n    }\n\n    val, err := jsonptr.Get(document, `/a/0`)\n    if err != nil {\n        fmt.Printf(\"Error: %s\\n\", err)\n    } else {\n        fmt.Printf(\"Got: %v\\n\", val)\n    }\n}\n```\n\n## Status\n\nProduction ready.\n\nThe aim is code coverage of 100%. Use go coverage tools and consider any\ncode not covered by the testsuite as never tested and full of bugs.\n\nTodo:\n* tests of error cases\n\n## License\n\nCopyright 2016-2020 Olivier Mengué\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmen-go%2Fjsonptr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolmen-go%2Fjsonptr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmen-go%2Fjsonptr/lists"}