Skip to content

encoding/json/jsontext: Decoder.Reset and Encoder.Reset should allow nil #80117

Description

@dsnet

I'm using jsontext.Encoder and jsontext.Decoder with a sync.Pool. Ideally, I should be able to put the encoder/decoder back into the pool without referencing the memory for the underlying io.Reader and io.Writer. Unfortunately, calling Reset(nil) panics. We should permit nil and just allow subsequent method calls to panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Post-proposal

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions