1

I need to store java object (may be json formatted) in Redis. I was searching over internet and found ReJson module.

{
    "site": "sddd",
    "pConfig" : {
        "floatpoint" : "http://10.32.3.36:8003",
        "user" : "root",
        "password" : "xxx"
    },
    "Config": {
        "initInSecs": 0,
        "checkInSecs": 29
    },
    "refC": {
        "initSecs": 0,
        "InSecs": 59,
        "InSecsOnDown": 15,
        "InMillis" : 5000,
        "endPoints": [
            {
                "ip": "10.32.17.66",
                "port": "22"
            },
            {
                "ip": "10.32.17.66",
                "port": "21"
            }
        ]
    },
    "syncWConfig": {
        "initDelayInSecs": 0
    }
}

Can you please help how to store this Json using ReJson. I also want to retrieved elements and its values. Can you help with small code snippet.

Guy Korland
  • 9,139
  • 14
  • 59
  • 106
VJS
  • 2,891
  • 7
  • 38
  • 70

1 Answers1

1

You should check JRedisJSON java client https://github.com/RedisJSON/JRedisJSON

As for search and secondary index support it should be available soon for RedisJSON see https://github.com/RedisJSON/RedisJSON2

Guy Korland
  • 9,139
  • 14
  • 59
  • 106