Class RecordConverter

All Implemented Interfaces:
AvroTypeConverter

public class RecordConverter extends AvroTypeConverterWithStrictJavaTypeCheck<Map>
  • Constructor Details

  • Method Details

    • convertValue

      public Object convertValue(org.apache.avro.Schema.Field field, org.apache.avro.Schema schema, Map jsonValue, Deque<String> path, boolean silently)
      Specified by:
      convertValue in class AvroTypeConverterWithStrictJavaTypeCheck<Map>
    • createRecordBuilder

      protected org.apache.avro.data.RecordBuilderBase<org.apache.avro.generic.GenericData.Record> createRecordBuilder(org.apache.avro.Schema schema)
    • setField

      protected void setField(org.apache.avro.data.RecordBuilderBase<org.apache.avro.generic.GenericData.Record> builder, org.apache.avro.Schema.Field subField, Object fieldValue)
    • canManage

      public boolean canManage(org.apache.avro.Schema schema, Deque<String> path)
      Description copied from interface: AvroTypeConverter
      used to know if this class can convert the json value to the avro value
      Parameters:
      schema - the avro schema in which to convert the json
      path - the path of the current field. Can be used to define a specific converter for a path
      Returns:
      true if this class should be used to convert the value