Comments (10)
^^^^^^^^ the trait `FromRedisValue` is not implemented for `serde_json::Value`
If I specify type it works let json_data: String
, but I don't know the structure, it's a json data, so it's serde_json::Value
from redis-rs.
@zebede22 are you sure this isn't an issue with the redis-macros crate? can you provide an example that relies only on redis-rs?
from redis-rs.
@zebede22 are you sure this isn't an issue with the redis-macros crate? can you provide an example that relies only on redis-rs?
Yes, redis-rs is not related.
Here same code without the redis-crate:
let json_data: Value = conn.json_get(key, "$").await?;
Error:
error[E0277]: the trait bound `serde_json::Value: FromRedisValue` is not satisfied
--> src/redis.rs:14:33
|
14 | let json_data: Value = conn.json_get(key, "$").await?;
| ^^^^^^^^ the trait `FromRedisValue` is not implemented for `serde_json::Value`
|
= help: the following other types implement trait `FromRedisValue`:
bool
isize
i8
i16
i32
i64
i128
usize
and 44 others
note: required by a bound in `redis::JsonAsyncCommands::json_get`
from redis-rs.
is serde_json::Value
supposed to implement FromRedisValue
? if so, where is it implemented?
Again, that's not a redis-rs type, so it's hard for me to understand whether this is an issue in redis-rs or not.
from redis-rs.
is
serde_json::Value
supposed to implementFromRedisValue
? if so, where is it implemented? Again, that's not a redis-rs type, so it's hard for me to understand whether this is an issue in redis-rs or not.
It's been working until 0.24 change.
Also, how to get a json from an endpoint where you have no exact json structure? how it can be done without serde_json?
from redis-rs.
how to get a json from an endpoint where you have no exact json structure? how it can be done without serde_json?
You can use a HashMap, or a string. We're trying to understand what changed, and the more moving parts there are, the harder it is to pinpoint the source of the issue.
It's been working until 0.24 change.
Maybe, but I need a minimal reproducible example in order to understand the issue. If you want to create a small project to simulate the problem, that will be very helpful.
from redis-rs.
Sounds like you have two separate versions of redis
in your dependency tree. Looking at the redis-macros
crate it does infact have redis version 0.23 as a dependency which is not semver compatible with 0.24.
-> Not related to the redis crate, you just need to use the same version or ask redis-marcros to update the dependency.
from redis-rs.
This is still happening, just happened to me after upgrading. I believe this is a redis-rs issue rather than another lib issue.
from redis-rs.
Check your Cargo.lock
or cargo tree
, it is very likely you have two separate versions of the redis crate in your dependencies.
from redis-rs.
from redis-rs.
Related Issues (20)
- TypeError: "Response type not convertible to numeric" HOT 16
- Missing stream commands HOT 4
- Err(Password authentication failed- AuthenticationFailed) HOT 5
- Is there a way to use tokio + rustls +webpki-roots ? HOT 13
- Attempt to scan binary keys returns Invalid UTF-8- TypeError HOT 2
- Redis TTL command returns overflow values on unsigned int HOT 1
- in cluster mode, tls mode is replaced after certs() is called HOT 1
- Allowing the requirement of a tcp timeout when using sentinel as well as when using redis client directly HOT 3
- How to run the tests? HOT 1
- Question: How to use redis-rs to test a redis module written in rust? HOT 3
- Porposal: New Clients sharding to connect to multiple Redis Nodes but sharding at client level HOT 6
- Program hangs when explicitly setting TlsMode::Insecure HOT 4
- crate feature json does not support NX and XX args HOT 1
- Questions: about the async implementation of watch/multi/exec support HOT 1
- support maybe async HOT 1
- multiplex connection doesn't recover from ErrorKind::IoError HOT 4
- add ability to specify count for scan match HOT 1
- output stops around 15k messages. Can you please help with what's wrong with this example? HOT 11
- provide two-stage api for MultiplexedConnection HOT 6
- Things to complete for 0.26v
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-rs.