Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.3, 1.9.5
-
Fix Version/s: None
-
Component/s: JsonParser
-
Labels:None
-
Environment:All
-
Number of attachments :
Description
When trying to parse invalid JSON, I get the following message from jacksonParserException.getLocalizedMessage() ->
Unexpected character ('u' (code 117)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@3d3da092; line: 1, column: 2]
The issue appears to be that "StringReader" does not implement toString, so we get the broken output above. I'm trying to filter this message down to users, so this is pretty nasty. I'm currently removing this with the following regex: message.replaceFirst(/[Source: java.io.StringReader@[0-9a-zA-Z]; (.)]$/, /$1/)
Not sure what the request alternative would be here.
Would leave it open, but since we are moving to Github, I am trying to clean up entries without actionable plans. Can be re-filed at https://github.com/FasterXML/jackson-databind/issues if there are specific improvement suggestions.