Open newhook opened 2 years ago
Why does this require the object demarshal to a map[string]interface{}? The bytes could equally well contain any valid json (arrays, strings, and so on).
map[string]interface{}
t.Helper() var obj map[string]interface{} err := json.Unmarshal(bs, &obj) if err != nil { message := fmt.Sprintf("error while parsing JSON\nerror:\n %s\nJSON:\n %s\n", err, string(bs)) Verify(t, strings.NewReader(message), alwaysOption(opts).WithExtension(".json")) } else { VerifyJSONStruct(t, obj, opts...) } }
Why does this require the object demarshal to a
map[string]interface{}
? The bytes could equally well contain any valid json (arrays, strings, and so on).