Skip to content

Ability to serialize / deserialize boolean properties as numeric values in json #911

@cutz

Description

@cutz

Feature description

I have a boolean property that I would like to serialize/deserialize to json as a numeric value 0 or 1. I believe this typically could be done by annotating the property with @JsonFormat(shape=JsonFormat.Shape.Number). As documented micronaut doesn't not support the shape property for JsonFormat and attempts to use it result in the following error:

Annotation @JsonFormat specifies attribute 'shape'. Currently supported attributes include: [timezone, pattern, locale, lenient]

Are there any plans to support this?

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