null
type id handling does not work with writeTypePrefix()
#4407
Labels
null
type id handling does not work with writeTypePrefix()
#4407
Describe your Issue
(note: regression partly due to #3373, reported f.ex as #4354 (but not just that))
So: if custom
TypeIdResolver
returnsnull
fromidFromValue()
oridFromValueAndType()
, result is that underlyingJsonGenerator.writeTypePrefix()
call is omitted. This may work for some cases, but won't for others, because necessary parts of structure are missing.Conceptually the idea would be that
null
for Type Id means "do not add Type Id", but doing so cannot be done by simply skipping calls toJsonGenerator
swriteTypePrefix()
andwriteTypeSuffix()
: rather, calls need to be made but these methods need to be aware of possibly missing type id and output whatever else is necessary.The text was updated successfully, but these errors were encountered: