Class XmlBeanSerializer

    • Method Detail

      • unwrappingSerializer

        public JsonSerializer<java.lang.Object> unwrappingSerializer​(NameTransformer unwrapper)
        Description copied from class: JsonSerializer
        Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). If no unwrapped serializer can be constructed, will simply return serializer as-is.

        Default implementation just returns serializer as-is, indicating that no unwrapped variant exists

        Overrides:
        unwrappingSerializer in class JsonSerializer<java.lang.Object>
        Parameters:
        unwrapper - Name transformation to use to convert between names of unwrapper properties
      • serialize

        public void serialize​(java.lang.Object bean,
                              JsonGenerator g,
                              SerializerProvider provider)
                       throws java.io.IOException
        Main serialization method that will delegate actual output to configured BeanPropertyWriter instances.
        Specified by:
        serialize in class BeanSerializerBase
        Parameters:
        bean - Value to serialize; can not be null.
        g - Generator used to output resulting Json content
        provider - Provider that can be used to get serializers for serializing Objects value contains, if any.
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object