Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

how to read json value for a key in jedis?

$
0
0

I have a code where I need to get a json value for the key "product_id" using Jedis but I don't know if jedis.get() operation can output json directly. Here is the code below.

Jedis jedis = pool.getResource();    jedis.select(1);    String attributeName = jedis.get(facet);    jedis.select(0);    JSONObject productJson =  jedis.get(productID);    String attributeValue = productJson.getString(attributeName);

Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>