Comments (7)
I suspect this may be related to MSRV (minimum supported Rust version). What rustc version are you using? Currently, I believe we only support 1.51 and above.
Edit:
You need to enable the std
feature for serde-json-core
to implement std::error:Error
for the type. Check your Cargo.toml file.
from serde-json-core.
Similar issue here for the latest version "0.2.0".
from serde-json-core.
I'm getting the same thing for version 0.4.0
.
from serde-json-core.
Oh, OK, that would be it, I was trying to build without std
. 👍
from serde-json-core.
Closing then. I adapted the title for better discoverability.
For future reference: per default this crate is no_std
-compatible, which per definition excludes implementing std::error::Error
.
If you need std::error::Error
, activate the std
feature for this crate in your Cargo.toml
file.
from serde-json-core.
I dont want the std::error. im trying to use no-std. and i still get this error.
serde = { version = "1", default-features = false, features = ["derive"] }
serde-json-core = { version = "0.4", default-features = false, features = ["heapless"] }
is in my cargo.toml ... is there something missing?
from serde-json-core.
This can be a result of some of your other dependencies if you're using an older version of Cargo. Cargo's original feature resolver had a bug where dev-dependencies and such could enable features on other crates. Check out https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
Also, check out cargo tree -e features
to look at what features are actually enabled.
from serde-json-core.
Related Issues (20)
- String escaping
- Detect string end quotes correctly
- thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)' HOT 2
- Serialize into externally allocated buffer
- Transfer ownership to rust-embedded-community HOT 13
- Repository points to documentation
- Update README
- Float deserialization fails when no trailing characters are present
- Library panics when deserializing certain types due to `unreachable!()` statements HOT 9
- Library should publicly export heapless HOT 1
- Incorrect serialization of bytes?
- Example Proposition for str deserialization HOT 1
- This is not real core lib since it depends on serde which is standard library. HOT 2
- Cannot be combined with serde std HOT 2
- Support for pretty-print serialized output? HOT 7
- Support for "block-wise" serialization? HOT 2
- deserialize_str with escaped strings is broken
- Feature Request: Support defmt Formatting HOT 3
- Improve README documentation on how to use this crate HOT 1
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 serde-json-core.