convert rss to JSON [closed]
Asked Answered
J

6

15

craigslist has an rss feed and i wish to convert the feed to JSON format so that I can parse it. anybody know any tool that can do this - convert craigslist rss (or any rss) to JSON format

Judicious answered 22/3, 2009 at 3:31 Comment(0)
R
43

UPDATE: beware, Yahoo Pipes has now been shutdown by Yahoo! and the Google Feed API has been deprecated. Check superfeedr.com's API which also does RSS to JSON conversion.

You can use google feed api service

Example:

https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=http://phys.org/rss-feed/&num=20

Structure https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=RSS_URL_TO_CONVERT&num=

Also if you want better control on RSS conversion use http://pipes.yahoo.com/pipes/ where you can visualize data flow.

EDIT: As yahoo pipes is no more working, here are the list of alternatives http://www.makeuseof.com/tag/12-best-yahoo-pipes-alternatives-look/

Reduce answered 29/8, 2013 at 15:19 Comment(2)
exactly what i looked for when Google referenced me to this answer :)Constrictive
Google Feed API is dead with 2nd December 2015 :(Uthrop
S
3

RSS is already in XML format, which is natively parsable by all browsers. I would recommend just parsing the XML directly instead of converting to json for parsing.

Spigot answered 22/3, 2009 at 4:16 Comment(2)
Web browsers wont let you download xml, they check the mime type, in a browser without lots of issues, otherwise I would agree.Starfish
#5801269Starfish
P
2

John Resig has a post about this:

http://ejohn.org/projects/rss2json/

Prentice answered 22/3, 2009 at 3:35 Comment(3)
tried this already. the example he gave on the page is not working. also tried using the url he supplied with craigslist, it's not working tooJudicious
for example, i tried this - ejohn.org/apps/rss2json/?url=http://sfbay.craigslist.org/search/… and i didn't get any resultJudicious
You downloaded the Perl scripts and followed all those directions?Prentice
H
1

I'd recommend using Yahoo Pipes to do this. You can simply pull the feed, and it acts as a proxy; JSONP is supported as well.

Hike answered 10/4, 2013 at 18:38 Comment(0)
M
0

You could try using one of the many javascript libraries to navigate through the XML.

For example, here. There are many more libraries, here are the ones Google thought were good enough to host.

Mariandi answered 22/3, 2009 at 10:46 Comment(0)
J
0

You can also try the Oxygen XML Editor (http://www.oxygenxml.com/). They offer a 30-day trial version and it's cross-platform. You can find the converter under Tools -> XML to JSON...

Jaehne answered 26/4, 2013 at 22:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.