{"record":{"id":"758b16eb46624aaa","repo":"apache/seatunnel","slug":"common-02-758b16","errorCode":"COMMON-02","errorMessage":"<identifier> JSON convert/parse '<payload>' operation failed.","messagePattern":"<identifier> JSON convert/parse '<payload>' operation failed\\.","errorType":"error_code","errorClass":"org.apache.seatunnel.common.exception.SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-google-sheets/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/sheets/deserialize/GoogleSheetsDeserializer.java","lineNumber":58,"sourceCode":"            String[] fields, DeserializationSchema<SeaTunnelRow> deserializationSchema) {\n        this.fields = fields;\n        this.deserializationSchema = deserializationSchema;\n    }\n\n    @Override\n    public SeaTunnelRow deserializeRow(List<Object> row) {\n        Map<String, Object> map = new HashMap<>();\n        for (int i = 0; i < row.size(); i++) {\n            if (i < fields.length) {\n                map.put(fields[i], row.get(i));\n            }\n        }\n\n        try {\n            String rowStr = objectMapper.writeValueAsString(map);\n            return deserializationSchema.deserialize(rowStr.getBytes());\n        } catch (JsonProcessingException e) {\n            throw CommonError.jsonOperationError(\"GoogleSheets\", map.toString(), e);\n        } catch (IOException e) {\n            throw GoogleSheetsError.deserializeError(map.toString(), e);\n        }\n    }\n}\n","sourceCodeStart":40,"sourceCodeEnd":64,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-google-sheets/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/sheets/deserialize/GoogleSheetsDeserializer.java#L40-L64","documentation":"GoogleSheetsDeserializer.deserializeRow converts each row map to a JSON string with Jackson's ObjectMapper and hands it to the configured SeaTunnelDeserializationSchema. If Jackson cannot serialize the row map (JsonProcessingException), the connector wraps it in a CommonError JSON-operation error (COMMON-02) naming the connector and payload. This indicates the row data could not be converted to the JSON representation the deserialization schema expects.","triggerScenarios":"objectMapper.writeValueAsString(map) throws JsonProcessingException while serializing a Google Sheets row map, e.g. the map contains a value Jackson cannot serialize (unwritable/self-referencing object) or a serialization feature blocks the write.","commonSituations":"Custom/corrupted cell values producing non-serializable objects; running with a Jackson version or configuration that fails on certain map values; debugging with modified deserialization code that injects unusual payloads.","solutions":["Inspect the payload printed in the error message for values that cannot be serialized to JSON","Upgrade/align the Jackson (jackson-databind) version used by the connector","Check any custom deserializationSchema implementation for content that breaks serialization","Enable JsonUtils/ObjectMapper forgiving features (e.g. FAIL_ON_EMPTY_BEANS=false) if bean serialization is the issue"],"exampleFix":"// before\nreturn deserializationSchema.deserialize(rowStr.getBytes());\n// after\nString rowStr = JsonUtils.toJsonString(map);\nreturn deserializationSchema.deserialize(rowStr.getBytes(StandardCharsets.UTF_8));","handlingStrategy":"try-catch","validationCode":"// Java: verify the map is JSON-serializable before calling deserializeRow\ntry {\n    new ObjectMapper().writeValueAsString(rowMap);\n} catch (JsonProcessingException e) {\n    throw new IllegalStateException(\"Row not serializable: \" + e.getMessage(), e);\n}","typeGuard":"boolean isJsonSerializable(Object o) {\n    try { new ObjectMapper().writeValueAsString(o); return true; }\n    catch (JsonProcessingException e) { return false; }\n}","tryCatchPattern":"try {\n    deserializer.deserializeRow(rowMap);\n} catch (SeaTunnelCommonException e) {\n    if (e.getCommonCode() == CommonErrorCode.JSON_OPERATION_FAILED) {\n        log.error(\"Unserializable Google Sheets row payload\", e);\n        // skip or dead-letter the row\n    } else { throw e; }\n}","preventionTips":["Keep cell values as plain strings/numbers before deserialization","Pin a known-good jackson-databind version in the classpath","Disable FAIL_ON_EMPTY_BEANS on the ObjectMapper","Test the deserialization schema with representative sheet data"],"tags":["json","serialization","google-sheets"],"backgroundTag":"json-marshal-failed","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"}