Skip to content

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

@velovix

Description

@velovix

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions