Giter Club home page Giter Club logo

Comments (6)

Byron avatar Byron commented on July 18, 2024

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.

erickt avatar erickt commented on July 18, 2024

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.

Byron avatar Byron commented on July 18, 2024

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.

erickt avatar erickt commented on July 18, 2024

I filed #43 and #44 for these issues :)

from serde.

Byron avatar Byron commented on July 18, 2024

Awesome :) ! Thanks !

from serde.

Byron avatar Byron commented on July 18, 2024

By the way: You can see how a relatively uninitiated user (me) uses serde on youtube.

from serde.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.