ViennaRSS / vienna-rss

Vienna is a free and open-source RSS/Atom newsreader for macOS.
https://www.vienna-rss.com
Apache License 2.0
1.85k stars 227 forks source link

Add support for JSON Feed #889

Closed barijaona closed 1 year ago

barijaona commented 7 years ago

JSON Feed is a new format - similar to RSS and Atom but in JSON. It has potential to get traction because JSON is simpler to implement and test than XML, and the data model already contains nearly all fields that most feeds need, without requiring complex methods to generate a summary, main image and so on.

More info: jsonfeed.org. If we implement support of JSON Feed, we should try to share code with the Google Reader class.

Eitot commented 7 years ago

Perhaps a bit too novel?

barijaona commented 7 years ago

Yes, we have the usual egg and chicken dilemma… but it is already supported on many popular publishing tools and at least another Mac newsreader.

I am slightly worried by the slow decline of RSS support by mainstream medias, so implementing JSON feed early would be :

josh64x2 commented 7 years ago

Well I'd keep it out of GoogleReader class because the responsibilities are totally different.

Eitot commented 7 years ago

From what I can see, XML parsing is done by the RichXMLParser class. For once, this seems to be quite nicely done, as it is only really used by RefreshManager and not referenced across the place. This means that it should be straightforward to add a JSON complement to RichXMLParser.

It may be a good idea to add a parser protocol or superclass to account for potential implementation differences between both parsers.

From what I understand, JSON parsing isn’t that fantastic in Foundation though. I did come across SwiftyJSON a while ago, which might be something to consider.

Eitot commented 7 years ago

Swift 4 has native encoding/decoding support for JSON and other formats. They demonstrated this and it looks very interesting and useful. Will be doing some tests while working on #798. Might be worth delaying support for JSON feed until 10.13 release.

Constantin07 commented 6 years ago

I cannot read CoreOS news https://coreos.com/releases/releases.json too Very inconvenient to use different RSS readers for XML and JSON formats. Is there any plan to add json support ?

Eitot commented 6 years ago

I am currently working on refactoring the RSS parser to work with the new Decoder protocol. Then it should be relatively easy to add a JSON Feed decoder based on a simple protocol implementation.

Eitot commented 5 years ago

FeedKit is unfortunately Swift-only and the developer does not intend to change this.

TAKeanice commented 5 years ago

There is no problem with a Swift-only framework, because we can easily write an adapter class which is marked @objc gives us access to everything we need from FeedKit. Or we can look how far we get by making everything we need @objc. Keeping our own FeedKit version with some few lines changed should not break our necks

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mcorossigo commented 4 years ago

Please, JSON Feed is becoming increasingly popular, with new shiny rss readers like NetNewsWire supporting it out of the box. It would be great if Vienna could support it.

josh64x2 commented 4 years ago

Test feed could be https://usesthis.com/feed.json Please feel free to add any others whilst I start working on this soon.

barijaona commented 1 year ago

Closed by #1649