Comments (6)
Actually there is no choice, and I am using it already !
It was already a great learning experience, as I was forced to dig into macros and compiler plugins a little more.
Without it, I would be totally lost, thanks for making serde
in the first place !
from serde.
Happy to help! Let me know if you run into any problems. Just to let you know I've been iterating a lot on it recently which changes some of the Apis, which I hope to have a new release out this weekend.
from serde.
Great to hear ! Actually I have found two issues already - I will just list them here so we can figure out what to do with them. It's totally possible that I just don't know how to use serde
correctly :).
Problem 1 (minor)
When sending requests to the server as json, these may be partial, thus only a few fields are actually set. Optional fields are declared with Option<_>
properties that are None
. Currently they end up as "field"=Null
in json, which is valid, but wastes space
Possible solution: option to omit 'name=null' during serialize
Problem 2 (critical)
If I deserialize server replies to a respective struct
, the said deserialization will fail if the server responds with all known AND added fields. There should be a way to say 'ignore extra fields' when deserializing. Otherwise my API will be out-of-date quickly thanks to it's growing inability to deserialize server responses.
Possible solution: option to ignore fields we don't have in target struct
Thanks for your input.
from serde.
I filed #43 and #44 for these issues :)
from serde.
Awesome :) ! Thanks !
from serde.
By the way: You can see how a relatively uninitiated user (me) uses serde
on youtube.
from serde.
Related Issues (20)
- I cant Deserialize a length more than 32 array HOT 1
- Unexpected behaviour with untagged enums and numeric keys
- rename field attribute, passing a path instead of literal
- Should `deserialize_any` be avoided in a library?
- Skip serializing generic still requires the bound
- Serialize value from already cached serialized string HOT 2
- Rename fields at runtime
- Compile error use of unstable feature on `nightly-2023-08-25` HOT 3
- Allow deserialize() to have a non-Self return type HOT 1
- Trait bounds for deserialization are enforced even if deserialization is skipped. HOT 1
- Support adding prefix/suffix to flattened fields HOT 2
- AsyncDeserializer HOT 6
- Implement Serialize and Deserialize for core::convert::Infaillible HOT 4
- Conditional selection of (De-)Serializer
- Remove serde-yaml from suggested packages HOT 3
- Flattened nested structs throw deserialize error "invalid type: map, expected f64" when inner type contains a float HOT 4
- Make it easier to implement `deny_unknown_fields` for flattened structs
- Support for SerializeMap handling all keys before all values
- Sometimes (de)serialise enum with tag, sometimes untagged.
- `Option<T>` defaults to `None` when missing fields HOT 4
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.