2
0

Add tests for other types of JSON objects

This commit is contained in:
Jack Christensen
2015-09-04 13:40:59 -05:00
parent 9d200733b9
commit fff5b9759b
3 changed files with 159 additions and 82 deletions
+5 -1
View File
@@ -1008,7 +1008,11 @@ func decodeJson(vr *ValueReader, d interface{}) error {
}
bytes := vr.ReadBytes(vr.Len())
return json.Unmarshal(bytes, d)
err := json.Unmarshal(bytes, d)
if err != nil {
vr.Fatal(err)
}
return err
}
func encodeJson(w *WriteBuf, value interface{}) error {