Skip to content

Custom field names are ignored when serializing #97

@kabochkov

Description

@kabochkov

I expect the following class to serialize for ex. in {"model_name":"Audi"}, but @JsonProperty value is ignored and I get {"modelName":"Audi"}

    public static class Car {

        private String modelName;

        public Car(@JsonProperty("model_name") String carName) {
            this.modelName = carName;
        }

        @JsonProperty("model_name")
        public String getModelName() {
            return modelName;
        }
    }

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