You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
When iter.ReadVal(obj) failed, the error did not propagate to the objectLazyAny.err.
Reproducing:
funcTestJsoniter(t*testing.T) {
api:= jsoniter.Config{
DisallowUnknownFields: true,
}.Froze()
varvstruct{ Foostring }
// using Any.ToVal cannot see any errorsobj:=api.BorrowIterator([]byte(`{"bar": true}`)).ReadAny()
obj.ToVal(&v)
t.Log(obj.LastError()) // this is nil, expecting "found unknown field: bar"// using ReadVal can see the expected errorsiter:=api.BorrowIterator([]byte(`{"bar": true}`))
iter.ReadVal(&v)
t.Log(iter.Error) // this is "found unknown field: bar"
}