-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting deeper nested JSON objects as String #2938
Comments
@dmaier-redislabs Let's check our test suit:
When we set a plain String using |
@dmaier-redislabs For the second part of your question:
As for Gson, the idea was brought from JRedisJSON where the approach to support RedisJSON V1 was decided several years ago. |
|
Consider
|
Yeah, but it's not really good usability to refer to a very general low-level method. Is your solution applicable to getJson(...)? |
Aren't you looking for something low-level anyway? I get that it's even lower than your expectation but you won't always get what you want. There would trade offs.
I don't understand your question. What/Where is getJson(...)? |
It's fine. I am getting that there is no way to pass the builder to the high-level method. Usability-wise it would be enough to retrieve the result a JSON string (stringified JSON, not a String property). This seems to be the case with Path2. Again, this is all about usability. It was just not totally obvious to me when/why to use Path2 vs. Path. I didn't associate it to the version. So is it expected that developers use from now on (with the new RedisJSON version) always Path2, and Path will no longer be used in the future? |
It entirely depends on the RedisJSON. |
This is also not a bug, but more a potential usability improvement.
I would like to be able to get the result of
client.getJson
as a String in order to use a customer deserialization method.A related question Why does
client.getJson(key, Path.ROOT_PATH)
return a Gson LinkedTreeMap, butclient.getJson(key, Path2.ROOT_PATH)
returns an org.json.JSONArray? It seems that we use two different libraries for Json representations here. Is this by intention? Can I influence the result deserialization somehow by plugging my own deserializer in?The text was updated successfully, but these errors were encountered: