我需要在 Redis 中存储 java 对象(可能是 json 格式)。我在互联网上搜索并找到了 ReJson 模块。
{
"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
}
}
您能否帮助如何使用 ReJson 存储此 Json。我还想检索元素及其值。你能帮忙处理小代码片段吗?