Closed dsnet closed 2 months ago
WARNING: This commit includes breaking changes.
Declare a jsontext.Pointer type as a named string type.
This allows us to implement a Tokens method to conveniently iterate over all the reference tokens in the pointer using the upcoming iterators support.
The new functionally is currently not tested by CI, but can be manually tested with:
GOEXPERIMENT=rangefunc go.tip test ./...
I can imagine the following:
func (*Encoder) WriteTokens(seq iter.Seq2[Token, error]) error func (*Decoder) ReadTokens() iter.Seq2[Token, error]
but that can be future API.
WARNING: This commit includes breaking changes.
Declare a jsontext.Pointer type as a named string type.
This allows us to implement a Tokens method to conveniently iterate over all the reference tokens in the pointer using the upcoming iterators support.
The new functionally is currently not tested by CI, but can be manually tested with: