Go implementation of JSON Pointer (RFC 6901)
Last updated Jun 2, 2026
97
Stars
5
Forks
0
Issues
0
Stars/day
Attention Score
34
Language breakdown
Go 100.0%
▸ Files
click to expand
README
go-jsonpointer
Go implementation of JSON Pointer (RFC6901)
Usage
jsonpointer.Get(obj, pointer)
json := { "foo": [1,true,2] } var obj interface{} json.Unmarshal([]byte(json), &obj) jsonpointer.Get(obj, "/foo/1") // Should be true
jsonpointer.Set(obj, pointer, newvalue)
json := { "foo": [1,true,2] } var obj interface{} json.Unmarshal([]byte(json), &obj) jsonpointer.Set(obj, "/foo/1", false) // obj should be {"foo":[1,false,2]}
jsonpointer.Remove(obj, pointer)
json := { "foo": [1,true,2] } var obj interface{} json.Unmarshal([]byte(json), &obj) jsonpointer.Remove(obj, "/foo/1") // obj should be {"foo":[1,2]}
Installation
$ go get github.com/mattn/go-jsonpointer
License
MIT
Author
Yasuhiro Matsumoto (a.k.a mattn)
🔗 More in this category