RMapCache adds some special characters before
See original GitHub issueRedisson version - 3.12.3 Java version - 11
final TypedJsonJacksonCodec codec = new TypedJsonJacksonCodec(String.class, JSONObject.class, new ObjectMapper());
JSONObject value = new JSONObject(new HashMap<String, String>() {{
put("a", "b");
}});
RMapCache<Object, JSONObject> myMapCache = redissonClient.getMapCache("myMapCache", codec);
myMapCache.put("key", value, 14, TimeUnit.DAYS);
RLocalCachedMap<Object, JSONObject> myLocalCachedMap = redissonClient.getLocalCachedMap("myLocalCachedMap", codec, LocalCachedMapOptions.defaults());
myLocalCachedMap.put("key", value);
With use of codec: RMapCache HGETALL returns
- “"key"”
- “\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00{"a":"b"}” from redis-cli.
RLocalCachedMap returns
- “"key"”
- “{"a":"b"}” from redis-cli.
My question - what is the special characters in RMapCache. And how can i read json without this characters by call HGET on raw Redis?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Search java string for 'special' characters before inserting into ...
I am trying to convert from MS Access to DerbyDB. However some varchar fields have 'special' characters, such ...
Read more >Uses of Interface org.redisson.api.RFuture - javadoc.io
Returns approximated number of unique elements added into this instances and other instances defined through otherLogNames . RFuture<Void>, RStreamAsync.
Read more >Java based Rate limiter with Redis + RollingLimit + backoff
During certain redis operations, I am facing PartitionSelectorException. Caused by: io.lettuce.core.cluster.PartitionSelectorException: Cannot determine a ...
Read more >Java data structures with Redis. Introduction to Redisson
RMapCache <Integer, String> map = redisson.getMapCache("someMap"); map.put(20, "oldobj", 20, ... set.add(new MyObj("value"));. MyObj obj = queue.peek();.
Read more >How to remove all special characters from String in Java ...
You should spend some time sharing your regular expression skill, as it's one of the powerful tools for debugging and troubleshooting. It is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Slava96 I’m seeing the same behavior. What did you end up doing?
I’m also facing same issue but for different scenario. Key which inserted through Redission library have additional characters and works fine if I read it again through Redission but not with other platform like Python library or redis-cli.
Our requirement is to read/write same key from different application (here it is SpringBoot & Django).