Skip to content

Conversation

noahdietz
Copy link
Contributor

@noahdietz noahdietz commented Feb 18, 2022

This introduces a new type ProtoJSONStream. This type wraps an io.ReadCloser that represents a JSON stream formatted as a JSON array, and decodes each item (which are JSON Objects) into a predefined Protobuf message type. The primary use case is to enable clients to decode HTTP-JSON server-streams into protobuf messages as needed.

This could later be extended to support writing to a stream (e.g. the Write end of an open pipe used as a HTTP Request body) in the same format.

@noahdietz noahdietz changed the title feat: proto json stream PoC feat: introduce ProtoJsonStream Feb 24, 2022
@noahdietz noahdietz changed the title feat: introduce ProtoJsonStream feat: introduce ProtoJSONStream Feb 24, 2022
@noahdietz noahdietz marked this pull request as ready for review February 24, 2022 22:44
@noahdietz noahdietz requested a review from a team as a code owner February 24, 2022 22:44
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@noahdietz
Copy link
Contributor Author

Tested locally with Firestore RunQuery RPC. Worked great!

@noahdietz noahdietz merged commit c86b5bd into googleapis:main Mar 8, 2022
@noahdietz noahdietz deleted the proto-json-stream branch March 8, 2022 23:30
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

Successfully merging this pull request may close these issues.

2 participants