Skip to content

Add option to present all fields of a message for JSON #413

Description

@keyuebao

It’s surprising when Message.new(array: []).to_json_hash gets encoded to {}.

A decoded proto Message will still respond to the array field, supplying the default value. A JSON response however, will fail to do so. This seems inconsistent. Happy to submit a PR for this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions