Open freman opened 6 years ago
It'd be sweet to be more compatible with the encoding/json Decode interface
Specifically functions like
func (dec *Decoder) More() bool func (dec *Decoder) Token() (Token, error)
Seem to be missing with no equivilent.
Useful for parsing giant streaming files (of a single object) and splitting them into multiple objects - or extracting an array.
eg: https://ip-ranges.amazonaws.com/ip-ranges.json
Would be parsed by skipping through tokens until we got to the prefixes array, then parsed as a stream of objects until done
Hi,
Sure, I agree it would be a good idea. I'm ok for pull requests if you want to contribute. Otherwise I'll try to find time to do it.
Let me know if you want to add these or if I should do it. Thanks
It'd be sweet to be more compatible with the encoding/json Decode interface
Specifically functions like
Seem to be missing with no equivilent.
Useful for parsing giant streaming files (of a single object) and splitting them into multiple objects - or extracting an array.
eg: https://ip-ranges.amazonaws.com/ip-ranges.json
Would be parsed by skipping through tokens until we got to the prefixes array, then parsed as a stream of objects until done