Add nested mutations

This commit is contained in:
Vikram Rangnekar
2019-12-25 01:24:30 -05:00
parent 96ed3413fc
commit 6831d3f56f
23 changed files with 1617 additions and 404 deletions

View File

@ -5,7 +5,7 @@ import (
"encoding/json"
)
func Tree(v []byte) (map[string]interface{}, bool, error) {
func Tree(v []byte) (map[string]json.RawMessage, bool, error) {
dec := json.NewDecoder(bytes.NewReader(v))
array := false
@ -25,7 +25,7 @@ func Tree(v []byte) (map[string]interface{}, bool, error) {
}
// while the array contains values
var m map[string]interface{}
var m map[string]json.RawMessage
// decode an array value (Message)
err := dec.Decode(&m)