public FieldToRowDataConverter createRowConverterByObjectMapper(RowType rowType) {
        final FieldToRowDataConverter[] fieldConverters =
                rowType.getFields().stream()
                        .map(RowType.RowField::getType)
                        .map(this::createConverter)
                        .toArray(FieldToRowDataConverter[]::new);
        final String[] fieldNames = rowType.getFieldNames().toArray(new String[0]);

        return origStr -> {
            JsonNode jsonNode = objectMapper.readTree(origStr);
            ObjectNode node = (ObjectNode) jsonNode;
            int arity = fieldNames.length;
            GenericRowData rowData = new GenericRowData(arity);
            for (int i = 0; i < arity; i++) {
                String fieldName = fieldNames[i];
                JsonNode field = node.get(fieldName);
                try {
                    Object convertedField = convertField(fieldConverters[i], fieldName, field);
                    rowData.setField(i, convertedField);
                } catch (Throwable t) {
                    throw new RuntimeException(String.format("Fail to deserialize at field: %s.", fieldName), t);
                }
            }
            return rowData;
        };
    }
Creates a runtime converter which assuming input object is not null.
inlong-sort/sort-formats/format-rowdata/format-rowdata-json/src/main/java/org/apache/inlong/sort/formats/json/FieldToRowDataConverters.java