Skip to content

Message#to_json should convert field names to lowerCamelCase #408

Closed
@aslakhellesoy

Description

@aslakhellesoy

According to the Protobuf 3 language guide:

By default proto3 JSON printer should convert the field name to lowerCamelCase and use that as the JSON name.

I know this library isn't currently targetting Proto 3, but is this something you'd be open to a PR for? Backwards compatibility could be maintained by making this an opt-in feature. For example:

json = message.to_json(lower_camel_case: true)

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