-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Milestone
Description
Describe the bug
When I apply @Builder
and @Jacksonzied
along with @Data
or @Value
and @Accessors(fluent = true)
my object gets deserialised correctly but serialisation doesn't work and I end up with {}
To Reproduce
@Value
@Builder
@Jacksonized
@Accessors(fluent = true)
public static class MyObject {
String objectName;
}
objectMapper.writeValueAsString(MyObject.builder().objectName("name").build());
Expected behavior
The output should be {"objectName":"name"}
Version info (please complete the following information):
- Lombok version 1.8.22
- All platforms
Additional context
I'm migrating from Immutables which solves this by adding @JsonProperty
to all of the Immutable object's fluent getters.
bfg
Metadata
Metadata
Assignees
Labels
No labels