Skip to content

ungerik/go-json-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse and create JSON as tree data-structure

go-json-tree allows you to dynamically query data from the map[string]interface{} based tree data-structure generated by json.Unmarshal().

See:

FromBytes(jsonBytes []byte) (Tree, error)
FromString(jsonString string) (Tree, error)
FromFile(filename string) (Tree, error)
FromURL(url string) (Tree, error)
FromReader(reader io.Reader) (Tree, error)

Builder creates such json.Marshal() compatible trees.

Example:

var builder json.Builder
builder.BeginObject().Name("Greeting").Value("Hello World!").EndObject()

// Create tree and query "Greeting"
greeting := builder.Tree().Select("Greeting").GetString()

About

JSON tree representation for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages