go-simplejson
go-simplejson copied to clipboard
a Go package to interact with arbitrary JSON
Implemented a thin wrapper of encoding/json's Decoder, since I wanted stream-reader for simplejson.
In Standard Library `"encoding/json"`, do `json.Unmarshal(bytes, target)` multiple times with different bytes, only duplicate keys will be overwritten by newer one, other keys are always kept. ```go var j, _...
To form json objects, you need the functions of adding arrays
I'm using go-simplejson in an application for finding differences between two maps. Go-simplejson is a great tool to ease navigation through maps. I find it useful that maps could have...
This PR allows you to use Set() and SetPath() to add arrays and have Array() and StringArray() work.
I don't think the following test is correct. ```go func (j *Json) Array() ([]interface{}, error) { if a, ok := (j.data).([]interface{}); ok { return a, nil ``` `j.data` is already...
Every exported function in a program should have a doc comment. The first sentence should be a summary that starts with the name being declared. From [effective go](https://golang.org/doc/effective_go.html#commentary). PR generated...
``` fatal error: concurrent map read and map write goroutine 264720 [running]: runtime.throw(0x79cf89, 0x21) /usr/local/golang/go/src/runtime/panic.go:608 +0x72 fp=0xc0006ed770 sp=0xc0006ed740 pc=0x42c262 runtime.mapaccess2(0x72b9c0, 0xc0002b59e0, 0xc000ac4b30, 0x7f9d80, 0x496b00) /usr/local/golang/go/src/runtime/map.go:453 +0x223 fp=0xc0006ed7b8 sp=0xc0006ed770 pc=0x40ed83 reflect.mapaccess(0x72b9c0,...
In my project ,I need the json output to be []map[string]interface{} ,so I add a MapArray & MustMapArray, please check this