Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. ObjectMapper.readValue() has thrown a JsonParseException
    jackson-databind
    5
    14
    2
  2. ParserMinimalBase._reportUnexpectedChar() has thrown a JsonParseException
    Jackson-core
    31
    109
    13

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('¬' (code 172)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (byte[])"?? p"; line: 1, column: 2]
1 matching frame hidden
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663)
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:561)
    at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2624)
    at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:826)
5 frames hidden

Solution

Bridget11 months ago

Rather than generating JSON by string concatenation, which is pretty much guaranteed to give you functionality and security issues, I recommend using a JSON library instead. We use Jersey in JIRA but any would do.

External results for this pattern (10)

  1. COLABORATIvia GitHub1 week ago
    Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@219cad19; line: 1, column: 2]
    Show stack trace
  2. jeiroavia GitHub1 month ago
    Unexpected character (':' (code 58)): Expected space separating root-level values at [Source: io.netty.buffer.ByteBufInputStream@7a095640; line: 1, column: 3]
    Show stack trace
  3. ravithbvia GitHub1 month ago
    Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot POST /v1/com.wix/access_token</pre> </body> </html> ; line: 1, column: 2]
    Show stack trace
  4. crackytsivia GitHub1 month ago
    Unexpected character ('-' (code 45)): Expected space separating root-level values at [Source: 2017-09-26 13:39:51,608 - geoip_country - DEBUG - 10.1.137.180 {"error": "GeoIP resolving error"} ; line: 1, column: 6]
    Show stack trace
  5. HansBrendevia GitHub1 month ago
    Unexpected character ('
' (code 8232 / 0x2028)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (String)"
{"some": "json"}"; line: 1, column: 2]
    Show stack trace
  6. liserivia GitHub2 months ago
    Unexpected character ('#' (code 35)): expected a valid value (number, Str ing, array, object, 'true', 'false' or 'null') at [Source: src\main\resources\swagger\api.yml; line: 1, column: 2]
    Show stack trace
  7. siom79via GitHub2 months ago
    Failed to parse spec as JSON or YAML
    Show stack trace
  8. siom79via GitHub2 months ago
    Failed to parse spec as JSON or YAML
    Show stack trace
  9. anadal-fundaciobitvia GitHub2 months ago
    Error creant o actualitzant document electronic 1a440905-e5c1-4cdb-93a9-24a2b1093e32#c85deb55-f41c-42da-90c7-2ea17c372b69: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /services/setFinalDocument. Reason: Error reading from remote server Apache/2.2.15 (Red Hat) Server at esb.caib.es Port 443 ; line: 1, column: 2]
    Show stack trace
  10. com.fasterxml.jackson.core.JsonParseException: Unexpected character ('s' (code 115)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@21526f6c; line: 1, column: 2]
    Show stack trace