I'm having difficulties figuring out how to access map keys using the redisson redis library. I want to be able to (with redisson) access keys that are created by a system that is not using redisson. Say I use redis-cli
...
sasus:16379> hset user fname "Nancy"
(integer) 1
sasus:16379> hset user lname "Schmancy"
(integer) 1
sasus:16379> hset user email "nanc@example.org"
(integer) 1
sasus:16379> hset user system "none"
(integer) 1
sasus:16379> hgetall user
1) "fname"
2) "Nancy"
3) "lname"
4) "Schmancy"
5) "email"
6) "nanc@example.org"
7) "system"
8) "none"
Now a simple java method to retrieve...
public static void getNancy() {
Config config = new Config();
config.useSingleServer().setAddress("redis://sasus:16379");
RedissonClient redisson = Redisson.create(config);
RMap user = redisson.getMap("user");
System.out.println("user: " + user);
redisson.shutdown();
}
This throws a JacksonParseException
...
Unrecognized token 'fname': was expecting 'null', 'true', 'false' or Nan
...on the call to getMap("user")
I see some discussion of Codecs but it's not clear to me if that is the solution. Can someone point me in the right direction? This seems like it should be a common use case.