@@ -20,6 +20,40 @@ An implementation of JSON Pointer for golang, which supports go `struct`.
2020
2121API is stable.
2222
23+ ## Import this library in your project
24+
25+ ``` cmd
26+ go get github.com/go-openapi/jsonpointer
27+ ```
28+
29+ ## Basic usage
30+
31+ See [ examples] ( ./examples_test.go )
32+
33+ ``` go
34+ import (
35+ " github.com/go-openapi/jsonpointer"
36+ )
37+
38+ ...
39+
40+ pointer , err := jsonpointer.New (" /foo/1" )
41+ if err != nil {
42+ ... // error: e.g. invalid JSON pointer specification
43+ }
44+
45+ value , kind , err := pointer.Get (doc)
46+ if err != nil {
47+ ... // error: e.g. key not found, index out of bounds, etc.
48+ }
49+
50+ ...
51+ ```
52+
53+ ## Change log
54+
55+ See < https://github.com/go-openapi/jsonpointer/releases >
56+
2357## References
2458
2559< https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 >
@@ -62,8 +96,8 @@ using the special trailing character "-" is not implemented.
6296<!-- Badges: documentation & support -->
6397[ doc-badge ] : https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F
6498[ doc-url ] : https://goswagger.io/go-openapi
65- [ godoc-badge ] : https://godoc.org /github.com/go-openapi/jsonpointer?status.svg
66- [ godoc-url ] : http://godoc.org /github.com/go-openapi/jsonpointer
99+ [ godoc-badge ] : https://pkg.go.dev /github.com/go-openapi/jsonpointer?status.svg
100+ [ godoc-url ] : http://pkg.go.dev /github.com/go-openapi/jsonpointer
67101[ slack-badge ] : https://slackin.goswagger.io/badge.svg
68102[ slack-url ] : https://slackin.goswagger.io
69103<!-- Badges: license & compliance -->
0 commit comments