{"record":{"id":"b5f7c65a90d643c2","repo":"antonmedv/fx","slug":"unexpected-character-q","errorCode":null,"errorMessage":"Unexpected character %q","messagePattern":"Unexpected character %q","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/jsonx/json.go","lineNumber":182,"sourceCode":"\tcase '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':\n\t\tl = p.parseNumber(p.end - 1)\n\tcase '{':\n\t\tl = p.parseObject()\n\tcase '[':\n\t\tl = p.parseArray()\n\tcase 't':\n\t\tl = p.parseKeyword(\"true\", Bool)\n\tcase 'f':\n\t\tl = p.parseKeyword(\"false\", Bool)\n\tcase 'n':\n\t\tl = p.parseNullOrNan()\n\tcase 'N':\n\t\tl = p.parseNan(p.end - 1)\n\tcase 'i', 'I':\n\t\tl = p.parseInfinity(p.end - 1)\n\tcase 'u':\n\t\tif p.strict {\n\t\t\tpanic(fmt.Sprintf(\"Unexpected character %q\", p.char))\n\t\t}\n\t\tl = p.parseKeyword(\"undefined\", Undefined)\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Unexpected character %q\", p.char))\n\t}\n\n\t// Skip whitespace will block parseValue (with io.Read in refill func),\n\t// as soon as we parsed the root value, return and ignore remining whitespaces.\n\tif !root {\n\t\tp.skipWhitespace()\n\t}\n\n\treturn l\n}\n\nfunc (p *JsonParser) parseString() *Node {\n\treturn &Node{\n\t\tKind:       String,","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/antonmedv/fx/blob/4f31cd3a0c5d66f1b4290a2719bab14a5cee8ebe/internal/jsonx/json.go#L164-L200","documentation":"Panic in JsonParser.parseValue when the current character cannot start any known JSON (or non-strict extension) value: not a digit, bracket, keyword letter, NaN/Infinity prefix, and not 'u' in non-strict mode. Indicates malformed input such as a stray symbol or invalid literal at the marked position.","triggerScenarios":"Thrown at internal/jsonx/json.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or correct the unexpected character at the reported position","Run in non-strict mode if the input intentionally uses undefined","Pre-validate the JSON payload before parsing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4f31cd3a0c5d66f1b4290a2719bab14a5cee8ebe","analyzedAt":"2026-09-02T02:17:47.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}