Hello,
JsonObjectReader.java
explicitly assumes "__typename" as the subtype field.
Would it be possible to consider @JsonbTypeInfo(key = "myField") key field if the annotation is defined?
There are use cases where the type is not part of the schema (e.g JSON scalar) and demands more flexibility.
Considering Contentful JSON scalar model for rich-text the expected supported code could be:
@JsonbTypeInfo(key = "nodeType", value = {
@JsonbSubtype(alias = "document", type = Document.class),
@JsonbSubtype(alias = "heading-1", type = Heading1.class)
...
})
public interface Content {
}
@Type("document")
public class Document implements Content {
}
Thank you :)
Hello,
JsonObjectReader.java
explicitly assumes
"__typename"as the subtype field.Would it be possible to consider
@JsonbTypeInfo(key = "myField")key field if the annotation is defined?There are use cases where the type is not part of the schema (e.g JSON scalar) and demands more flexibility.
Considering Contentful JSON scalar model for rich-text the expected supported code could be:
Thank you :)