Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
superchalupa opened this issue Aug 13, 2021 · 0 comments
Open

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

superchalupa opened this issue Aug 13, 2021 · 0 comments

Comments

@superchalupa
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant