One additional feature is the ability to denote relevant path of references (during serialization/deserialization) to help in troubleshooting.
249250251252253254255256257258259
{ // [Issue#71]: When converting, we actually get TokenBuffer, which is fine if (!(jgen instanceof ToXmlGenerator)) { // but verify if (!(jgen instanceof TokenBuffer)) { throw new JsonMappingException("XmlMapper does not with generators of type other than ToXmlGenerator; got: " +jgen.getClass().getName()); } return null; } return (ToXmlGenerator) jgen;