Comments (6)
merged in #55
from rss.
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.
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.
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.
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.
@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)
- Automatically add the content namespace to a channel when an item makes use of <content:encoded> (or document the requirement) HOT 1
- Allow taking a chrono::DateTime when setting e.g. pub_date, last_build_date, etc.
- Add dc:date item field to pubDate field HOT 4
- valid RSS feed can not be parsed HOT 1
- Allow choice between `write_cdata_element` and `write_text_element` HOT 5
- Err when reading/writing/reading a channel
- Track changes
- All build methods returning String instead of Error HOT 3
- Make ToXml public HOT 4
- wasm build HOT 2
- Add support for the podcast namespace
- Getters and setters for new extensions HOT 2
- update `quick_xml` dependency HOT 2
- Support CDATA or values without escaping when writing Extension.value HOT 4
- Invalid RSS feed when having 0 items in a podcast HOT 6
- Failed to build HOT 1
- Extensions not recognized when namespaces are declared inline HOT 1
- Podcast rss feed returns EOF with rust-syndication crate HOT 8
- iTunes extension not working while the extensions map does contain the respective information HOT 8
- Encode & and < with hex codes 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 rss.