question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JsonParseException: Unrecognized token '': was expecting ('true', 'false' or 'null')

See original GitHub issue

On the redis-cli, when I run: hgetall id:3bb536598d71 I see

 1) "id"
 2) "\"811\""
 3) "item"
 4) "[{\"id\": \"4429\", \"validity\": {\"startDate\": \"2018-12-06T00:00:00\", \"endDate\": \"2018-12-08T23:00:00\"}]"
 5) "show"
 6) "true"

But when I run:

Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
RedissonClient client = Redisson.create(config);

RMap<String, Object> map = client.getMap("id:3bb536598d71");
map.readAllEntrySet().forEach(System.out::println);

It is throwing an exception.

Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'show': was expecting ('true', 'false' or 'null')
 at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 15]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
jackyguruicommented, Dec 5, 2018

It appears the field and value of the hash do not have the same encoding scheme. The field seemed to be plain string whereas value were encoded as JSON strings. So trying to decode the plain string field with JSON decoder would no doubt fail since it is not a valid JSON string.

0reactions
durgeshkhismatraocommented, Dec 24, 2020

You need to find what JSON is actually being parsed. Run the application within a debugger, set a breakpoint on the relevant constructor for JsonParseException … then find out what is in the ByteArrayInputStream that it is attempting to parse

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unrecognized token 'http': was expecting ('true', 'false' or 'null ...
So I suspect that the parser is trying to parse something different than this string when the error occurs. You need to find...
Read more >
Unrecognized token 'Request': was expecting ('true', 'false' or ...
nested exception is com.fasterxml.jackson.core.JsonParseException: I validated that My JSON value is correct using http://json.parser.online.fr/ and ...
Read more >
How to solve JSON parse error: Unrecognized token issue in ...
JsonParseException : Unrecognized token 'uid': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at ...
Read more >
Java – Error Caused by: com.fasterxml.jackson.core ...
Java – JsonParseException: Unrecognized token 'http': was expecting ('true', 'false' or 'null'). We have the following string which is a valid JSON ...
Read more >
Attributes argument is not working, I have tried to filter by ...
JsonParseException : Unrecognized token 'attributes': was expecting ('true', 'false' or 'null')\n at [Source: (PushbackInputStream); line: 1, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found