Skip to content

feature: Add support for TextMarshaler and TextUnmarshaler #675

@fxamacker

Description

@fxamacker

Add TextMarshaler and TextUnmarshaler options.

This feature is not enabled by default, so it won't unintentionally change behavior of existing user applications.

This was proposed by @benluddy, approved, and he already opened a PR to:

Add TextMarshaler and TextUnmarshaler options to EncOptions and DecOptions, respectively. They're essentially derivative of the existing options for BinaryMarshaler and BinaryUnmarshaler.

Enabling this improves drop-in compatibility with encoding/json, which similarly marshals non-json.Marshaler TextMarshalers to strings and unmarshalers non-json.Unmarshaler TextUnmarshalers from strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions