microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.82k stars 5.38k forks source link

Json set / get issue #633

Open YatharthGupta opened 4 years ago

YatharthGupta commented 4 years ago

When set the data with json with below , unable to serialize it , its adding [ to contact and giving error during get.So actually the Json is getting Set in wrong format.

List people = new List() { new Person(1, "Joe", new List() { new Contact("1", "123456789"), new Contact("2", "234567890") } ) };

Can someone set and get above data with this version properly or fix this issue ASAP ?

chengweng commented 3 years ago

This should be a problem with your serialization tool, and should have nothing to do with redis. If you use spring, you can configure your RedisTemplate