Package io.debezium.data
Class SchemaUtil
java.lang.Object
io.debezium.data.SchemaUtil
Utilities for obtaining JSON string representations of
Schema
, Struct
, and Field
objects.- Author:
- Randall Hauch
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asDetailedString
(org.apache.kafka.connect.data.Field field) Obtain a JSON string representation of the specified field.static String
asDetailedString
(org.apache.kafka.connect.data.Schema schema) Obtain a JSON string representation of the specifiedSchema
.static String
asDetailedString
(org.apache.kafka.connect.data.Struct struct) Obtain a JSON string representation of the specifiedStruct
.static String
asDetailedString
(org.apache.kafka.connect.source.SourceRecord record) Obtain a JSON string representation of the specifiedSourceRecord
.static String
Obtain a JSON string representation of the specified field.static String
asString
(org.apache.kafka.connect.data.Field field) Obtain a JSON string representation of the specified field.static String
asString
(org.apache.kafka.connect.data.Schema schema) Obtain a JSON string representation of the specifiedSchema
.static String
asString
(org.apache.kafka.connect.data.Struct struct) Obtain a JSON string representation of the specifiedStruct
.static String
asString
(org.apache.kafka.connect.source.SourceRecord record) Obtain a JSON string representation of the specifiedSourceRecord
.
-
Constructor Details
-
SchemaUtil
private SchemaUtil()
-
-
Method Details
-
asString
Obtain a JSON string representation of the specified field.- Parameters:
field
- the field; may not be null- Returns:
- the JSON string representation
-
asString
Obtain a JSON string representation of the specified field.- Parameters:
field
- the field; may not be null- Returns:
- the JSON string representation
-
asString
Obtain a JSON string representation of the specifiedStruct
.- Parameters:
struct
- theStruct
; may not be null- Returns:
- the JSON string representation
-
asString
Obtain a JSON string representation of the specifiedSchema
.- Parameters:
schema
- theSchema
; may not be null- Returns:
- the JSON string representation
-
asString
Obtain a JSON string representation of the specifiedSourceRecord
.- Parameters:
record
- theSourceRecord
; may not be null- Returns:
- the JSON string representation
-
asDetailedString
Obtain a JSON string representation of the specified field.- Parameters:
field
- the field; may not be null- Returns:
- the JSON string representation
-
asDetailedString
Obtain a JSON string representation of the specifiedStruct
.- Parameters:
struct
- theStruct
; may not be null- Returns:
- the JSON string representation
-
asDetailedString
Obtain a JSON string representation of the specifiedSchema
.- Parameters:
schema
- theSchema
; may not be null- Returns:
- the JSON string representation
-
asDetailedString
Obtain a JSON string representation of the specifiedSourceRecord
.- Parameters:
record
- theSourceRecord
; may not be null- Returns:
- the JSON string representation
-