Skip to content

jsonpb: does not handle lower case string enums #613

Closed
@bbassingthwaite

Description

@bbassingthwaite

We've been relying on the c++ proto library for json transcoding and are now starting to shim in a golang piece that should provide the same functionality. We've run into an issue where we send a lowercase string of an enum that the c++ library handles, but the golang library does not.

For example:

Given an enum

enum Category {
    NOT_SPECIFIED = 0;
    LISTINGS = 1;
    REPUTATION = 2;
}

If I try unmarshall the json {"category": "listings"} it works with the c++ library, but fails on the golang library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions