Repository navigation
jsonv2.SkipFunc error in jwx/internal/json /registry.go #2285
Replies: 1 comment 1 reply
|
Confirmed by building jwx's registry.go pattern against go1.27rc2 with GOEXPERIMENT=jsonv2: the json/v2 API dropped No version bump fixes it yet, fwiw. v4.2.0 is the latest tag and develop/v4 still has the same SkipFunc line, so there's nothing to upgrade to until that change lands. Your PeekKind worry is fine: jsontext.Kind is a byte and '0' is KindNumber, so |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I used the library with Go 1.27RC2 as a test. In doing so, I noticed that a data type has changed in JSON v2. dec.PeekKind() no longer returns a rune, but presumably jsontext.KindNumber in jwx/internal/json. Further jsonv2.SkipFunc results in:
/registry.go to fail:
jwx\v4@v4.2.0\internal\json\registry.go:73:18: undefined: jsonv2.SkipFunc
Possible solution:
if dec.PeekKind() != jsontext.KindNumber {
// return jsonv2.SkipFunc
return nil
}
Can the problem be solved with a library upgrade (unless it works again with the final version of Go 1.27 anyway)? That would be very helpful.
All reactions