Skip to content

Check JsonUnmarshaller behaviour against individual fields #2

@Southclaws

Description

@Southclaws

Libraries like sethvargo/envconfig apply JsonUnmarshaller against individual fields - which currently doesn't appear to work. Need to check if the current behaviour is standard or if those libraries are not calling JsonUnmarshal correctly (likely the former) when the decoder is being passed an individual scalar value (like a string) instead of a full JSON object.

Some tests cover this already but using opt.Optional[string] inside a struct passed to sethvargo/envconfig resulted in a parse failure. This will also be addressed by #1 as envconfig tries this first, but I'd like to also support JSON scalar value decoding too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions