{"record":{"id":"27e9356c47918062","repo":"apache/seatunnel","slug":"json-parsing-exception-value-s-and-expected-t","errorCode":null,"errorMessage":"Json parsing exception, value '%s', and expected type '%s'","messagePattern":"Json parsing exception, value '(.+?)', and expected type '(.+?)'","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java","lineNumber":79,"sourceCode":"        } catch (JsonProcessingException e) {\n            if (typeReference.getType() instanceof ParameterizedType\n                    && List.class.equals(\n                            ((ParameterizedType) typeReference.getType()).getRawType())) {\n                try {\n                    log.warn(\n                            \"Option '{}' is a List, and it is recommended to configure it as [\\\"string1\\\",\\\"string2\\\"]; we will only use ',' to split the String into a list.\",\n                            option.key());\n                    return (T)\n                            convertToList(\n                                    rawValue,\n                                    (Class<T>)\n                                            ((ParameterizedType) typeReference.getType())\n                                                    .getActualTypeArguments()[0]);\n                } catch (Exception ignore) {\n                    // nothing\n                }\n            }\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Json parsing exception, value '%s', and expected type '%s'\",\n                            rawValue, typeReference.getType().getTypeName()),\n                    e);\n        }\n    }\n\n    static <T> List<T> convertToList(Object rawValue, Class<T> clazz) {\n        if (rawValue instanceof List) {\n            return ((List<?>) rawValue)\n                    .stream()\n                            .map(value -> convertValue(convertToJsonString(value), clazz))\n                            .collect(Collectors.toList());\n        }\n        return Arrays.stream(rawValue.toString().split(\",\"))\n                .map(String::trim)\n                .map(value -> convertValue(value, clazz))\n                .collect(Collectors.toList());","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java#L61-L97","documentation":"Thrown from ConfigUtil.convertValue when Jackson fails to deserialize a raw config value into the option's declared type — typically a String that is not valid JSON for the expected structure, or a scalar where an object/array was expected. It fires whenever a non-trivially-typed option (List, Map, POJO) receives a value whose text cannot be parsed; note that for List-typed options the code first attempts a comma-split fallback before this error escapes.","triggerScenarios":"Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write the option value as valid JSON matching the declared type, e.g. [\"a\",\"b\"] for a List<String>","For list options configured as a plain string, rely on the comma-split fallback or manually format as a JSON array","Validate the config file syntax (unbalanced quotes/brackets) with a JSON linter before submitting the job"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}