by hxtk · 1mo ago · 0 comments
The standard library maintainers recognized this as a problem that there was no “better,” more convenient way to do it and in encoding/json/v2 they have UnmarshalRead for that use case: https://pkg.go.dev/encoding/json/v2#UnmarshalRead
Don't believe there was a more convenient way to achieve the same without writing our own Decoders/Encoders.