-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
When using the json options, the returned diff string produces invalid JSON preventing it to be unmarshaled into something more usable.
Example
opts := jsondiff.DefaultJSONOptions()
diff, diffStr = jsondiff.Compare(j0, j1, &opts)
if diff != jsondiff.FullMatch {
fmt.Println(diffStr)
m := make(map[string]interface{})
err := json.Unmarshal([]byte(diffStr), m)
if err != nil {
log.Fatal(err)
}Produces
{
"prop-removed":{"error": {}
"prop-removed":{"code": -12001,}
"prop-removed":{"message": "rate limited"}
"prop-removed":{}},
"result": {"changed":[null, "otherVal"]}
}
FATA[2022-10-13T12:05:16-07:00] invalid character '"' after object key:value pair
nsf and raomuyang
Metadata
Metadata
Assignees
Labels
No labels