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

jsonapi: Add option to unmarshal from an io.Reader and marshal to an io.Writer #327

Open
velovix opened this issue Apr 24, 2019 · 0 comments

Comments

@velovix
Copy link
Contributor

velovix commented Apr 24, 2019

The current marshalling and unmarshalling functions in the jsonapi subpackage operate on byte slices exclusively. I think it would be very convenient if there were functions available to operate on io.Readers and io.Writers as well.

The encoding/json library exposes this through the Encoder and Decoder objects, which take an io.Reader or an io.Writer as arguments. Would it make sense to expose a similar API? If there's interest in this upstream, I would be happy to submit a PR!

@velovix velovix changed the title Add option to unmarshal from an io.Reader and marshal to an io.Writer jsonapi: Add option to unmarshal from an io.Reader and marshal to an io.Writer May 28, 2019
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