Is there a built-in way to only serialize the id of a child when using Jackson (fasterxml.jackson 2.1.1)? We want to send an Order
via REST which has a Person
reference. The person object however is quite complex and we could refresh it on the server side, so all we need is the primary key.
Or do I need a custom serializer for this? Or do I need to @JsonIgnore
all other properties? Would that prevent the Person
data from being sent back when requesting an Order
object? I'm not sure yet if I'll need that but I'd like to have control over it if possible...