eclipse-ee4j / yasson

Eclipse Yasson project
https://projects.eclipse.org/projects/ee4j.yasson
Other
204 stars 96 forks source link

JsonStructureToParserAdapter must implement skipObject() & skipArray() methods #595

Closed redmitry closed 1 year ago

redmitry commented 1 year ago

Describe the bug Yasson fails on deserialization when undeclared OBJECT or ARRAY property found in the polymorthic type.

Best,

D.

To Reproduce

  1. Create two polymorthic types ("Cat" & "Dog") that implements "Pet"
  2. in the cat.json add "undeclared" property of type Object.
  3. get the exception

Expected behavior yasson-test-595.zip

Cat is properly deserialized

System information:

Additional context The call that fails with "UnsupportedOperationException": ObjectDeserializer.java

Please find an attached test.