Java Code Examples for io.debezium.data.Json

Following code examples demonstrate how to use io.debezium.data.Jsonfrom debezium. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use io.debezium.data.Jsonand various code implementation of this class.

            if (data instanceof byte[]) {

                if (((byte[]) data).length == 0) {
                    r.deliver(column.isOptional() ? null : "{}");
                }
                else {
                    try {
                        r.deliver(JsonBinary.parseAsString((byte[]) data));
                    } catch (IOException e) {
                        throw new ConnectException("Failed to parse and read a JSON value on " + column + ": " + e.getMessage(), e);
                    }
                }
            } 


Advertisement
Javadoc
A semantic type for a JSON string. @author Randall Hauch
Advertisement