-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support JsonTypeInfo.Id.MARKER_FIELD request #1100
Comments
for more convenience can be added annotation @JsonSubTypesByFields (with multiple names): @JsonTypeInfo(use = JsonTypeInfo.Id.MARKER_FIELD)
@JsonSubTypesByFields({
@JsonSubTypesByFields.Type(value = ComplexTypeDto.class, names = {"fields"})
})
public class SimpleTypeDto {
private String id;
private String name;
...
} |
There is an existing issue for something along those lines, to allow inference of type information from existence of fields: #43 I don't think anyone is actively implementing such functionality: the main problem is that this does require holding the whole JSON Object in memory (currently this is not needed; property values are handled incrementally, with some exceptions related to buffering of type and/or object ids). I will add a link to this issue from there (since these are additional ideas), but will close this as duplicate. |
@cowtowncoder thank you for detailed answer |
@lex-em no problem, thank you for suggestion -- this is desired piece of functionality, but unfortunately not yet implemented. |
Hi, does this capability can be realized?
Serialization example data:
Json:
The text was updated successfully, but these errors were encountered: