Documentation ¶
Overview ¶
Package jsonpointer contains RFC 6901 JSON Pointer implementation.
Index ¶
Constants ¶
View Source
const DefaultDepthLimit = 1000
DefaultDepthLimit is default depth limit for ResolveCtx.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NotFoundError ¶
type NotFoundError struct {
Pointer string
}
NotFoundError reports that requested value is not found.
type RefKey ¶ added in v0.80.0
type RefKey struct { // Loc is an URL of JSON document. Loc string // Ptr is JSON Pointer. Ptr string }
RefKey is JSON Reference key.
type ResolveCtx ¶ added in v0.80.0
type ResolveCtx struct {
// contains filtered or unexported fields
}
ResolveCtx is JSON Reference resolve context.
func NewResolveCtx ¶ added in v0.80.0
func NewResolveCtx(root *url.URL, depthLimit int) *ResolveCtx
NewResolveCtx creates new ResolveCtx.
func (*ResolveCtx) AddKey ¶ added in v0.80.0
func (r *ResolveCtx) AddKey(key RefKey, file location.File) error
AddKey adds reference key to context.
func (*ResolveCtx) Delete ¶ added in v0.80.0
func (r *ResolveCtx) Delete(key RefKey)
Delete removes reference from context.
func (*ResolveCtx) File ¶ added in v0.80.0
func (r *ResolveCtx) File() (f location.File)
File returns last file from stack.
func (*ResolveCtx) IsRoot ¶ added in v0.80.0
func (r *ResolveCtx) IsRoot(key RefKey) bool
IsRoot returns true if location stack is empty.
Click to show internal directories.
Click to hide internal directories.