public class MercifulJsonConverter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MercifulJsonConverter.HoodieJsonToAvroConversionException
Exception Class for any schema conversion issue.
|
| Constructor and Description |
|---|
MercifulJsonConverter()
Uses a default objectMapper to deserialize a json string.
|
MercifulJsonConverter(boolean shouldSanitize,
String invalidCharMask)
Allows enabling sanitization and allows choice of invalidCharMask for sanitization
|
MercifulJsonConverter(com.fasterxml.jackson.databind.ObjectMapper mapper,
boolean shouldSanitize,
String invalidCharMask)
Allows a configured ObjectMapper to be passed for converting json records to avro record.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache(String schemaFullName)
Clear between fetches.
|
org.apache.avro.generic.GenericRecord |
convert(String json,
org.apache.avro.Schema schema)
Converts json to Avro generic record.
|
public MercifulJsonConverter()
public MercifulJsonConverter(boolean shouldSanitize,
String invalidCharMask)
public MercifulJsonConverter(com.fasterxml.jackson.databind.ObjectMapper mapper,
boolean shouldSanitize,
String invalidCharMask)
public org.apache.avro.generic.GenericRecord convert(String json, org.apache.avro.Schema schema)
json - Json recordschema - Schemapublic static void clearCache(String schemaFullName)
Copyright © 2024 The Apache Software Foundation. All rights reserved.