json icon indicating copy to clipboard operation
json copied to clipboard

encoding/json compat: missing .More() method on Decoder

Open superchalupa opened this issue 4 years ago • 0 comments

When re-encoding a stream back to text, the encoding/json library uses the .More() method to tell if it needs to place a comma.

You can peek ahead to the next token to see if you need to place a comma, so it's still possible to work. It just means that pkg/json is not a drop in, API compatible replacement.

superchalupa avatar Aug 13 '21 16:08 superchalupa