Skip to content

JsonFormat.printer() does not print fields set to their defaults #8

@yuhan-token

Description

@yuhan-token

JsonFormat.printer() does not print fields set to their defaults, e.g. integers that are 0, booleans that are false, strings that are empty. This is causing confusion in some of our API responses(when users can see the json response from a browser).

We might want to consider using the Printer.includingDefaultValueFields() option, but I suppose we had a reason not to use it in the first place?

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