{"record":{"id":"2a55682f807296e1","repo":"quarkusio/quarkus","slug":"unknown-json-value","errorCode":null,"errorMessage":"Unknown JSON Value ","messagePattern":"Unknown JSON Value ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-jsonb-common/runtime/src/main/java/io/quarkus/resteasy/reactive/jsonb/common/runtime/serialisers/VertxJson.java","lineNumber":107,"sourceCode":"                    JsonNumber number = origin.getJsonNumber(i);\n                    if (number.isIntegral()) {\n                        array.add(number.longValue());\n                    } else {\n                        array.add(number.doubleValue());\n                    }\n                    break;\n                case ARRAY:\n                    JsonArray newArray = new JsonArray();\n                    copy(newArray, origin.getJsonArray(i));\n                    array.add(newArray);\n                    break;\n                case OBJECT:\n                    JsonObject newObject = new JsonObject();\n                    copy(newObject, origin.getJsonObject(i));\n                    array.add(newObject);\n                    break;\n                default:\n                    throw new IllegalArgumentException(\"Unknown JSON Value \" + kind);\n            }\n        }\n    }\n\n    public static class JsonObjectSerializer implements JsonbSerializer<JsonObject> {\n        @Override\n        public void serialize(JsonObject json, JsonGenerator generator, SerializationContext ctxt) {\n            ctxt.serialize(json.getMap(), generator);\n        }\n    }\n\n    public static class JsonArrayDeserializer implements JsonbDeserializer<JsonArray> {\n\n        @Override\n        public JsonArray deserialize(JsonParser parser, DeserializationContext context, Type type) {\n            JsonArray object = new JsonArray();\n            copy(object, parser.getArray());\n            return object;","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-jsonb-common/runtime/src/main/java/io/quarkus/resteasy/reactive/jsonb/common/runtime/serialisers/VertxJson.java#L89-L125","documentation":"VertxJson is the Jsonb serializer/deserializer bridge for Vert.x JsonObject/JsonArray in RESTEasy Reactive. During recursive copy of a JsonArray, an element whose JSON kind does not match the handled cases (OBJECT, ARRAY, STRING, NUMBER, etc.) falls into the default branch and throws IllegalArgumentException. It indicates an unhandled JsonValue type reaching the copier.","triggerScenarios":"Serializing/deserializing a Vert.x JsonArray containing an element whose JSON kind is not one of the cases handled by copy(), e.g. an unusual or malformed JsonValue variant.","commonSituations":"Sending JSON payloads with element types the Vert.x parser maps to kinds the copier does not expect; version drift between Vert.x JSON model and the serializer; hand-built JsonObject/JsonArray instances passed to JAX-RS endpoints.","solutions":["Inspect the JSON payload and remove or convert the unsupported element type","Check the Vert.x JsonObject value kind enumeration and add a case for the missing kind in VertxJson.copy","Upgrade Quarkus and Vert.x to aligned versions so all JSON value kinds are handled"],"exampleFix":"// before\ndefault:\n    throw new IllegalArgumentException(\"Unknown JSON Value \" + kind);\n// after\ndefault:\n    array.add(origin.getValue(i)); // or handle the kind explicitly\n    break;","handlingStrategy":"validation","validationCode":"// Check each element kind before serializing\narray.forEach { v ->\n    val kind = v?.let { io.vertx.core.json.JsonObject::class } // verify only known kinds\n    require(v == null || v is String || v is Number || v is Boolean || v is JsonObject || v is JsonArray) {\n        \"Unsupported JSON element kind\"\n    }\n}","typeGuard":"fun isSupportedJsonElement(v: Any?): Boolean =\n    v == null || v is String || v is Number || v is Boolean || v is JsonObject || v is JsonArray","tryCatchPattern":null,"preventionTips":["Build JsonArray values only from primitives, JsonObject, and JsonArray","Pin aligned Quarkus/Vert.x versions","Add integration tests round-tripping complex JSON payloads"],"tags":["json","serialization","vertx","resteasy-reactive"],"backgroundTag":"json-serialization-unsupported-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}