5

I like to know how I could create a rss feed with json because right now I got to create one by following the example of kitchen sink

can you guide me please

Sabrina
  • 87
  • 2
  • 8
  • Sabrina when you ask questions on here try and be as precise about everything as possible and search here and Google first to see what you find before asking. Please also try and include code whenever you talk about it so in this example you mentioned the KitchenSink. Link to the specific part of the KichtenSink you're asking about so we can give you the best answer possible. If you'd of searched you might have found these first. http://stackoverflow.com/questions/670511/convert-rss-to-json and http://stackoverflow.com/questions/5555433/json-and-rss-feeds-difference Both of those could help. – rivenate247 May 04 '11 at 15:21

5 Answers5

9
  1. Pick a programming language (I'd go with Perl as I know it and I know the modules that can do this)
  2. Pick a JSON parser (I'd use JSON::Any)
  3. Pick a module that can build an RSS feed (I'd use XML::RSS)
  4. Get an HTTP client if you need it (LWP::Simple will probably do for this)
  5. Write some glue code to stick them together.
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • thank you for your answer but as I use Appcelerator's gonna be like the javascript code I need a small example it would be nice because I really begins in the Programming and with Appcelerator – Sabrina May 04 '11 at 09:55
  • The principle is the same. You need to get the data, parse it, then generate the XML. If you've got problems with one of those steps, I suggest you ask a new and more specific question. – Quentin May 04 '11 at 10:25
  • I just have a little example to see how it looks ready – Sabrina May 04 '11 at 10:53
5

as far as i know, rss is always XML. You should parse the Json to a correct RSS structure. check this out: http://www.xn--schler-dya.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/

here is how rss should look: http://www.landofcode.com/rss-tutorials/rss-structure.php

samuhe
  • 133
  • 2
  • 9
  • thank you I know how the structure looks like flux rss I am asked to create an RSS feed using json, but I really do not know what to do over I can not see what is the difference between the two methods – Sabrina May 04 '11 at 10:04
2

You don't. RSS is an XML-based technology.

RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.

You might as well ask "how can I write a CSS file with JSON?"

Peter Bailey
  • 105,256
  • 31
  • 182
  • 206
0

Using titanium if you want to build and XML like the one in the KitcheSink example you need to use XML. If you have JSON you could parse it yourself or use the Ti.Yahoo.yql to conver the JSON to XML then do the feed the same as the KitchenSink example.

Ti.Yahoo.yql

rivenate247
  • 2,116
  • 2
  • 16
  • 18
0

RSS is based on XML. You cannot create one using JSON

MattDevTech
  • 127
  • 5