Class BeanSerializer

    • Constructor Detail

      • BeanSerializer

        public BeanSerializer​(JavaType type,
                              BeanPropertyWriter[] properties,
                              BeanPropertyWriter[] filteredProperties,
                              AnyGetterWriter anyGetterWriter,
                              java.lang.Object filterId)
        Parameters:
        type - Nominal type of values handled by this serializer
        properties - Property writers used for actual serialization
      • BeanSerializer

        protected BeanSerializer​(BeanSerializer src)
        Copy-constructor that is useful for sub-classes that just want to copy all super-class properties without modifications.
        Since:
        1.7
      • BeanSerializer

        protected BeanSerializer​(BeanSerializerBase src)
        Alternate copy constructor that can be used to construct standard BeanSerializer passing an instance of "compatible enough" source serializer.
        Since:
        1.9
    • Method Detail

      • createDummy

        public static BeanSerializer createDummy​(java.lang.Class<?> forType)
        Method for constructing dummy bean deserializer; one that never outputs any properties
      • unwrappingSerializer

        public JsonSerializer<java.lang.Object> unwrappingSerializer()
        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>
      • toString

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