8000 support some way to stream json decoding in client · Issue #2192 · oapi-codegen/oapi-codegen · GitHub
[go: up one dir, main page]

Skip to content

support some way to stream json decoding in client #2192

@josharian

Description

@josharian

The strict server does streaming json decodes. The client does not, because it exposes a Body field, so it has to buffer the response. But this generates unnecessary allocations if (as I suspect is common) the Body field is unused.

I don't know what the design trade-offs are here, and how you'd want to expose it, but it'd be nice to be able to generate code optimized for being lightweight, which doesn't buffer all the reads.

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

      0