{"record":{"id":"9ef8fe58f2e79e32","repo":"apache/seatunnel","slug":"json-file-does-not-support-this-compress-type-9ef8fe","errorCode":null,"errorMessage":"Json file does not support this compress type: {}","messagePattern":"Json file does not support this compress type: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/JsonReadStrategy.java","lineNumber":110,"sourceCode":"    @Override\n    public void readProcess(\n            FileSourceSplit split,\n            Collector<SeaTunnelRow> output,\n            InputStream inputStream,\n            Map<String, String> partitionsMap,\n            String currentFileName)\n            throws IOException {\n        InputStream actualInputStream;\n        switch (compressFormat) {\n            case LZO:\n                LzopCodec lzo = new LzopCodec();\n                actualInputStream = lzo.createInputStream(inputStream);\n                break;\n            case NONE:\n                actualInputStream = inputStream;\n                break;\n            default:\n                log.warn(\n                        \"Json file does not support this compress type: {}\",\n                        compressFormat.getCompressCodec());\n                actualInputStream = inputStream;\n                break;\n        }\n        // rebuild inputStream\n        if (enableSplitFile && split.getLength() > -1) {\n            actualInputStream = safeSlice(actualInputStream, split.getStart(), split.getLength());\n        }\n        try (BufferedReader reader = createBomAwareBufferedReader(actualInputStream, encoding)) {\n            reader.lines()\n                    .forEach(\n                            line -> {\n                                try {\n                                    SeaTunnelRow seaTunnelRow =\n                                            deserializationSchema.deserialize(\n                                                    line.getBytes(StandardCharsets.UTF_8));\n                                    if (isMergePartition) {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/JsonReadStrategy.java#L92-L128","documentation":"Warning logged in JsonReadStrategy.readProcess's switch over CompressFormat when the configured compress_codec has no supported case for JSON reading. The compressed stream is passed through un-decompressed, so JSON parsing downstream will typically fail or produce corrupt rows.","triggerScenarios":"compress_codec config value maps to a CompressFormat enum not handled by the JSON reader's switch (only codecs like LZO/LZ4/GZIP/BZIP2/NONE are handled); default branch logs and uses the raw stream.","commonSituations":"Using a codec supported by other file readers but not the JSON path; copy-pasted config from another connector; typo in compress_codec producing an unexpected default.","solutions":["Change compress_codec to a supported value (none/gzip/bzip2/lz4/lzo) per JSON reader docs.","Pre-decompress files and read with compress_codec = none.","Convert files to a format whose reader supports the desired codec.","Verify the exact spelling and allowed values of compress_codec."],"exampleFix":"// before\ncompress_codec = \"zip\"\n// after\ncompress_codec = \"gzip\"","handlingStrategy":"validation","validationCode":"Set<String> jsonSupported = Set.of(\"none\",\"gzip\",\"bzip2\",\"lz4\",\"lzo\");\nif (!jsonSupported.contains(config.getString(\"compress_codec\"))) {\n    throw new IllegalArgumentException(\"compress_codec not supported by JSON reader\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check JSON reader codec support list before setting compress_codec.","Pre-decompress files for unsupported codecs.","Watch for this warning in logs — output rows will be corrupt if ignored."],"tags":["json","compression","config","unsupported-codec"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}