Skip to content

Ignoring unknown properties on de-serializing process#373

Merged
komamitsu merged 1 commit intomsgpack:developfrom
marenzo:develop
Jul 9, 2016
Merged

Ignoring unknown properties on de-serializing process#373
komamitsu merged 1 commit intomsgpack:developfrom
marenzo:develop

Conversation

@marenzo
Copy link
Copy Markdown
Contributor

@marenzo marenzo commented Jul 5, 2016

Related to #358

Having two entities, similar in fields except one may contain extra one, ObjectMapper will fail to de-serialize as it expects the payload to have exact same number of fields (properties) on the value type object.

Consider such case:

Pojo1 {
 field1;
 field2;
}

Pojo2 {
 field1;
}

Previous client could handle a case when de-serializing the payload of Pojo2 into Pojo1.

This is totally solvable by adding @JsonIgnoreProperties annotation, but since we already have JsonArrayFormat as helper for backward-compatibility, thought it also should be part of this utility.

@komamitsu
Copy link
Copy Markdown
Member

👍

@komamitsu komamitsu merged commit c9fd454 into msgpack:develop Jul 9, 2016
@komamitsu
Copy link
Copy Markdown
Member

@marenzo Thanks!

@marenzo
Copy link
Copy Markdown
Contributor Author

marenzo commented Jul 11, 2016

@komamitsu thanks for merging :) could you ping me when you'll release new version?

@komamitsu
Copy link
Copy Markdown
Member

@marenzo We released 0.8.8 a few weeks ago that includes this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants