You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
I'd like to get the JsonSubTypes annotation working for schema generation and serialization.
For schema generation, I think it should be a union of all the possible sub-types.
For serialization, if the configuration is such that the type name would be included as a property, ignore that, since it will be included as the name of the record type.
I have written some failing tests, but it is unclear to me how to proceed, since the TypeIdResolver doesn't provided a way to interrogate all possible types.
This is tough one. I agree in that union of subtypes is probably the way to go. I think JsonGenerator and JsonParser have support for so-called "native" object and type ids, and perhaps it would then be possible to actually subvert this to be used for implicit/off-band type ids? If you have time perhaps you might want to have a look at:
JsonGenerator.writeTypeId(Object) (and canWriteTypeId() to expose capability)
JsonParser.getTypeId() (and canReadTypeId())
as I think combination of these might actually work, when combined with schema lookup to do translation. It is a round-about way of doing things of course, and there may be gaps. But it seems like it just might be possible either as-is, or with possible minor fixes.
I'd like to get the JsonSubTypes annotation working for schema generation and serialization.
For schema generation, I think it should be a union of all the possible sub-types.
For serialization, if the configuration is such that the type name would be included as a property, ignore that, since it will be included as the name of the record type.
I have written some failing tests, but it is unclear to me how to proceed, since the TypeIdResolver doesn't provided a way to interrogate all possible types.
The text was updated successfully, but these errors were encountered: