Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert JSON to RSS via Web API?

I would like to create a generic Web API action that will accept a JSON URL as a parameter, then convert it to RSS. Everywhere I look I find RSS to JSON but not the other way around.

I did not want to use a 3rd party service but instead looking for a library that can do this. Any idea on how to leverage Web API to do this or should I just create a simple HTTP Handler for this?

like image 825
TruMan1 Avatar asked Jun 25 '13 18:06

TruMan1


1 Answers

You could implementing your own RSS or Atom custom MediaTypeFormatter. You can implement it so that the request will use this formatter when the accept header is set to application/atom+xml or application/rss+xml.

Filip has a blog describing this: RSS & Atom MediaTypeFormatter for ASP.NET WebAPI

like image 180
Maggie Ying Avatar answered Oct 21 '22 03:10

Maggie Ying