Documentation
¶
Index ¶
- Variables
- type Document
- func (d *Document) Delete(path []string) (bool, error)
- func (d *Document) Exists(path []string) (bool, error)
- func (d *Document) RenameString(from []string, to []string, overwrite bool) (bool, error)
- func (d *Document) Render() ([]byte, error)
- func (d *Document) SetString(path []string, text string) error
- func (d *Document) String(path []string) (string, bool, error)
- type Format
- type Kind
- type Member
- type RenderOptions
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPathExists = errors.New("json path already exists") ErrAncestorDescendantPath = errors.New("cannot rename between ancestor and descendant paths") )
JSON edit errors returned for invalid path operations.
Functions ¶
This section is empty.
Types ¶
type Document ¶
Document is an ordered JSON document plus the formatting preferences used to render it.
func (*Document) Delete ¶
Delete removes a nested value and prunes empty parent objects created by deletion.
func (*Document) RenameString ¶
RenameString moves a string value from one nested path to another.
type RenderOptions ¶
type RenderOptions struct {
SortKeys bool
}
RenderOptions describes optional render overrides.
Click to show internal directories.
Click to hide internal directories.