eclipse-ee4j / eclipse-ee4j/jersey
JsonBindingProvider.writeTo() Failed to Process Polymorphic Object
Open
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
this PR https://github.com/eclipse-ee4j/jersey/pull/5047 breaks the polymorphic behaviour.
I found a problem when the object is polymorphism, the JSON object won't be written into the `entityStream`.
When the object is polymorphism it will have a parent class type as `genericType` value which causes the `entityStream` is not written correctly which makes the `entityStream` value = {}.
`jsonb.toJson(object, type, writer)` will only write the object into `entityStream` if the `object` has equal class type with `type` parameter
Contributor guide
Assessment
This issue has not been assessed yet.