The below example code describes my situation. I need to add the type information to the serialization of a class. I have other classes that extend this interface but that should not matter.
I included a zip of the example code that I have for producing the error. What I get is Caused by: com.fasterxml.jackson.core.JsonGenerationException: Can not start an object, expecting field name (context: Object) at com.fasterxml.jackson.core.JsonGenerator._reportError( JsonGenerator.java:1961) at com.fasterxml.jackson.core.json.JsonGeneratorImpl._reportCantWriteValueExpectName( JsonGeneratorImpl.java:244) at com.fasterxml.jackson.core.json.JsonGeneratorImpl._verifyPrettyValueWrite( JsonGeneratorImpl.java:234) at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator._verifyValueWrite( WriterBasedJsonGenerator.java:846) at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeStartObject( WriterBasedJsonGenerator.java:260) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize( BeanSerializer.java:151) ..... I am failing to find or discover what the error really is and why it is trying to write a filed that I didn't specify as. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To post to this group, send email to jackson-user@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
<<attachment: example.zip>>