Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonError._embedded serialization broken with micronaut 3.4.0 #176

Closed
yawkat opened this issue Mar 31, 2022 · 0 comments · Fixed by #211
Closed

JsonError._embedded serialization broken with micronaut 3.4.0 #176

yawkat opened this issue Mar 31, 2022 · 0 comments · Fixed by #211
Assignees

Comments

@yawkat
Copy link
Member

yawkat commented Mar 31, 2022

Issue description

In 3.4.0, the Resource class became @Introspected. Before this change, the OptionalMultiValuesSerializer would fall back on the ObjectSerializer, which in turn would use a RuntimeTypeSerializer which would delegate to the right subtype for serialization.

However after the change, ObjectSerializer will simply specialize to the serializer for Resource, which will ignore properties of subtypes of Resource (e.g. the message of a JsonError). This manifests in the test read / write JsonError test case failing.

Not sure how to fix this. It seems to me like the addition of @Introspected should not change serialization behavior this way.

graemerocher added a commit that referenced this issue May 18, 2022
Use the runtime type if subtyping is involved or the type is abstract. Fixes #204

Also fixes #176
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 a pull request may close this issue.

2 participants