Class CompatibleFieldSerializer.CompatibleFieldSerializerConfig

    • Constructor Detail

      • CompatibleFieldSerializerConfig

        public CompatibleFieldSerializerConfig()
    • Method Detail

      • setReadUnknownFieldData

        public void setReadUnknownFieldData​(boolean readUnknownTagData)
        When false and encountering an unknown field, an exception is thrown or, if chunked encoding is enabled, the data is skipped.

        When true, the type of each field value is written before the value. When an unknown field is encountered, an attempt to read the data is made so if it is a reference then any other values in the object graph referencing that data can be deserialized. If reading the data fails (eg the class is unknown or has been removed) then an exception is thrown or, if chunked encoding is enabled, the data is skipped.

        In either case, if the data is skipped and references are enabled, then any references in the skipped data are not read and further deserialization receive the wrong references and fail.

        Default is true.

      • getReadUnknownTagData

        public boolean getReadUnknownTagData()
      • setChunkedEncoding

        public void setChunkedEncoding​(boolean chunked)
        When true, fields are written with chunked encoding to allow unknown field data to be skipped. Default is false.
        See Also:
        setReadUnknownFieldData(boolean)
      • getChunkedEncoding

        public boolean getChunkedEncoding()
      • setChunkSize

        public void setChunkSize​(int chunkSize)
        The maximum size of each chunk for chunked encoding. Default is 1024.
      • getChunkSize

        public int getChunkSize()