Giter Club home page Giter Club logo

Comments (6)

frewsxcv avatar frewsxcv commented on May 26, 2024 3

merged in #55

from rss.

frewsxcv avatar frewsxcv commented on May 26, 2024

I'm -1 personally, but I don't feel strongly. In my opinion serializing RSS to JSON is not a common enough usecase to warrant the extra dependency. I also don't want to give people the impression that they can use https://github.com/serde-rs/xml to output valid RSS XML. What do you think @jameshurst ? Another option would be to make it an opt-in optional dependency.

from rss.

frewsxcv avatar frewsxcv commented on May 26, 2024

Opened a pull request with opt-in serialization: #55

Let me know how it looks. You can use it by specifying features = ["serialization"] in your cargo.toml

from rss.

jameshurst avatar jameshurst commented on May 26, 2024

I'd agree with @frewsxcv here and say that this wouldn't really be a common enough use case and would probably add confusion regarding have serde output xml. I'd be -1 as well for this.

from rss.

djc avatar djc commented on May 26, 2024

So, the Rust API guidelines say that all types "that play the role of a data structure" should derive these. That seems a fairly strong recommendation. If the rust-syndication crate want to counter this advice, it would be good to start a discussion as part of the API guidelines repo to have some accepted exceptions transcribed in the guidelines.

I'm not sure the argument brought forward here ("we already serialize as XML natively") is very strong. The serde traits can cover anything from JSON to bincode, and there many reasons using one of those might be more attractive than XML for some transport mechanisms or a quick local cache (as we're doing in planetrs -- https://github.com/Vagdish/planetrs/issues/19). In addition, the cost here seems very low, especially as a feature that's disabled by default (ideally enabled with the serde flag, as recommended in the guidelines).

from rss.

frewsxcv avatar frewsxcv commented on May 26, 2024

@djc after letting this settle in my head for some months, and after reading your last comment here, i think you're absolutely right. i just updated the serialization pull request to just use the serde flag name. i'll flag you for a review if you've got a minute

from rss.

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.