Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jj

Read arbitrary and deeply nested JSON structures in Go with as little boilerplate code as possible.

Build Status GoDoc

var data jj.Value
str := `{ "foo": "bar", "bar": { "sub": "val", "int": 4 }, "baz": ["a", 9] }`
err := json.Unmarshal([]byte(str), &data)

fmt.Println(data.At("bar", "sub").String()) // panics if the key does not exist
// => "val"

fmt.Println(data.At("x").StringOrDefault("default")) // always succeeds
// => "default"

fmt.Println(data.At("baz", 1).Number())
// => 9

About

Read arbitrary and deeply nested JSON structures in Go with as little boilerplate code as possible.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages