Java Code Examples for io.debezium.data.Json

Following code examples demonstrate how to use io.debezium.data.Json from 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.Json and various code implementation of this class.
Example 1
Project : debezium Source File : MySqlValueConverters.java View Source Code on GitHub

            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);
                    }
                }
            }