I am storing lots of json strings as values in Redis Sorted Set. When I check them via Redis Insight, they have no problems. But when I check them via redis-cli and any other Java client, they are returned with escape characters.

Is there a way to request values without escape characters like what Redis Insight does?

Here is a sample image: Redis Please prevent escape characters when fetching stored redis strings (especially json)

Comment From: zuiderkwast

redis-cli --raw

Examples:

$ redis-cli get k
"\"x\":\"y\""
$ redis-cli --raw get k
"x":"y"

Try redis-cli --help for more options.

Comment From: zuiderkwast

any other Java client, they are returned with escape characters

I guess that's only how you print them. In the client itself the strings are just strings.

Anyway, redis-cli is in this repo. Java clients and Redis Insight are other projects.