Nicolas Martyanoff on Nostr: There's a serious problem with encoding/json in #Go: DisallowUnknownFields is ...
There's a serious problem with encoding/json in #Go: DisallowUnknownFields is useless. When set, the decoder will reject objects with unknown fields, but
1/ the error cannot be identified because it has no specific type (fmt.Errorf);
2/ the error only includes the name of field and not its location/path, making it really confusing in complex structures.
I had high hopes for encoding/json/v2, but the discussion is stucked in limbo.
And I really do not want to write another JSON parser.
1/ the error cannot be identified because it has no specific type (fmt.Errorf);
2/ the error only includes the name of field and not its location/path, making it really confusing in complex structures.
I had high hopes for encoding/json/v2, but the discussion is stucked in limbo.
And I really do not want to write another JSON parser.