First of all, this is something that Jackson 2.3 will handle gracefully (see https://github.com/FasterXML/jackson-databind/issues/238).
But until it gets released, there are 2 main ways to handle this:
- Add
@JsonIgnore
onisRoom()
, but keep@JsonProperty
ongetRoom()
- Change visibility settings to filter out all
isXxx()
methods: can either set global settings (ObjectMapper
has something likesetVisibility
), or use annotation@JsonAutoDetect
on classes
If this is an isolated case, you are probably better off by just using first one.