@Override
    public byte[] serialize(Row input) {
        try {
            JsonNode root = convert(rowFormatInfo, "", input);
            String text = objectMapper.writeValueAsString(root);

            return text.getBytes(Charset.forName(charset));
        } catch (Throwable t) {
            throw new RuntimeException(
                    String.format("Could not properly serialize the input to json. Input=[%s].", input), t);
        }
    }
Object mapper that is used to create output JSON objects.
inlong-sort/sort-formats/format-rowdata/format-rowdata-json/src/main/java/org/apache/inlong/sort/formats/json/JsonRowSerializationSchema.java