If you don't need to request java objects stored in redis (indexing, ratings ...), then you can just serialize them in bytearray using a library (e.g. Kryo) and save them in String in redis.Note that you you can serialize the whole set of Java objects in one redis line, just remember what class it is (collection type + object type), when you want to deserialize, you can, for example, define a smart key name for this purpose.
JSON will simply use more space and be more network intensive than other binary marshalling formats, if you do not need requests or data to be read by a person in redis, then it is normal (and more efficient) to store binary data in redis.
Note that if you use the jedis library (as you noted), you have Jedis methods that accept bytearrays as parameters instead of Java strings to send data as a C-String to Redis (without losing data in the process).
source share