@Override
    public SourceData decode(String srcString, Context context) {
        JsonObject root = gson.fromJson(srcString, JsonObject.class);
        JsonArray childRoot = null;
        if (CollectionUtils.isEmpty(childNodes)) {
            return new JsonSourceData(root, null, context);
        }
        JsonElement current = root;
        for (JsonNode node : childNodes) {
            if (!current.isJsonObject()) {
                // error data
                return new JsonSourceData(root, null, context);
            }
            JsonElement newElement = current.getAsJsonObject().get(node.getName());
            if (newElement == null) {
                // error data
                return new JsonSourceData(root, null, context);
            }
            // node is not array
            if (!node.isArray()) {
                current = newElement;
                continue;
            }
            // node is an array
            current = getElementFromArray(node, newElement);
            if (current == null) {
                // error data
                return new JsonSourceData(root, null, context);
            }
        }
        if (!current.isJsonArray()) {
            // error data
            return new JsonSourceData(root, null, context);
        }
        childRoot = current.getAsJsonArray();
        return new JsonSourceData(root, childRoot, context);
    }
decode
@param srcString
@param context
@return
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/decode/JsonSourceDecoder.java