I have a spring boot project and I have a class like this:
@Value
public class A {
@JsonUnwrapped
OrderKey key;
String description;
B b;
@Value
public static class B {
String description;
}
}
@Value
public class OrderKey {
@JsonProperty( "_key" )
String id;
}
I have mixins but added the Annotations in this example for brevity.
This works great when serializing to JSON, the issue is when I'm trying to deserialize, probably it would work if exist some @JsonWrapped
annotation.
In a nutshell, I'm trying to use ArangoDB with rest and I can create / read documents but I need to use my own Value Objects and unfortunately I can't use the key as String, it's encapsulated by an OrderKey
.
The @Value
annotations is from lombok project.
Is there any way to achieve this?