{"record":{"id":"0002fec805016d7d","repo":"quarkusio/quarkus","slug":"expected-after-attribute-0002fe","errorCode":null,"errorMessage":"Expected : after attribute","messagePattern":"Expected : after attribute","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/json/src/main/java/io/quarkus/bootstrap/json/JsonReader.java","lineNumber":121,"sourceCode":"                case '\"':\n                    readMember(members);\n                    break;\n            }\n        }\n\n        throw new IllegalArgumentException(\"Json object ended without }\");\n    }\n\n    /**\n     * member\n     * |----- ws string ws ':' element\n     */\n    private void readMember(Map<JsonString, JsonValue> members) {\n        final JsonString attribute = readString();\n        ignoreWhitespace();\n        final int colon = nextChar();\n        if (':' != colon) {\n            throw new IllegalArgumentException(\"Expected : after attribute\");\n        }\n        final JsonValue element = readElement();\n        members.put(attribute, element);\n    }\n\n    /**\n     * array\n     * |---- '[' ws ']'\n     * |---- '[' elements ']'\n     * </p>\n     * elements\n     * |----- element\n     * |----- element ',' elements\n     */\n    private JsonValue readArray() {\n        position++;\n\n        final List<JsonValue> elements = new ArrayList<>();","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/json/src/main/java/io/quarkus/bootstrap/json/JsonReader.java#L103-L139","documentation":"After reading a member's attribute (key string) in a JSON object, readMember() requires the next non-whitespace character to be ':'. If it is anything else, the object syntax is invalid and IllegalArgumentException is thrown. This enforces the JSON grammar rule 'string ws \":\" value'.","triggerScenarios":"A JSON member uses '=' instead of ':', or omits the colon entirely, e.g. '{\"a\" 1}' or '{\"a\"=1}'. Also triggered by a missing quote that makes the key parse differently than intended.","commonSituations":"Confusing properties-file syntax (key=value) with JSON; hand-editing JSON and deleting the colon; copy/paste from config files into JSON.","solutions":["Replace '=' with ':' between each key and value in the JSON object","Check that every member has the form \"key\": value with the colon present","Validate the JSON with a validator to pinpoint all syntax issues at once"],"exampleFix":"// before\n{\"key\"=1}\n// after\n{\"key\":1}","handlingStrategy":"validation","validationCode":"// Pre-scan for the '=' typo pattern inside JSON: \"key\"=value\nif (jsonText.matches(\"(?s).*\\\"[^\\\"]+\\\"\\\\s*=.*\")) {\n    throw new IllegalArgumentException(\"JSON uses '=' instead of ':'\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    JsonValue v = new JsonReader(text).read();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().equals(\"Expected : after attribute\")) {\n        // hint to user: properties-file syntax used instead of JSON syntax\n    }\n}","preventionTips":["Remember JSON members are \"key\": value — never key=value","When converting .properties-style config to JSON, replace '=' with ':'","Run a JSON validator on edited files before committing"],"tags":["json","parser","syntax"],"backgroundTag":"malformed-json-input","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}