In my Redis DB I want to save the following data:
{"id": "1", "data": "abc", "param": "p1"}
{"id": "2", "data": "def", "param": "p2"}
Currently I am saving each line as follows (using Jedis client in Java):
JEDIS.set(line.getId(),line.getLine());
So, the result is something like this:
"1", "{"id": "1", "data": "abc", "param": "p1"}"
GET 1
{"id": "1", "data": "abc", "param": "p1"}
Is it an efficient way to save this kind of data in Redis? Maybe it's better to convert each line to a Set or something?
{,},").