Class AvroNoWrappingConverter

  • All Implemented Interfaces:
    SchemaConverter

    public class AvroNoWrappingConverter
    extends Object
    implements SchemaConverter
    Provides conversion of JSON to/from Avro to remove the type so that it can be easily converted to a Java POJO.
    Author:
    Steve Hu
    • Constructor Detail

      • AvroNoWrappingConverter

        public AvroNoWrappingConverter()
    • Method Detail

      • toJson

        public SchemaConverter.JsonNodeAndSize toJson​(Object value)
        Converts Avro data (including primitive types) to their equivalent JsonNode representation.
        Specified by:
        toJson in interface SchemaConverter
        Parameters:
        value - the value to convert
        Returns:
        an object containing the root JsonNode representing the converted object and the size in bytes of the data when serialized