0

Is there any api or something to convert RSS feed to Json? I used the api rss2json api with restTemplate, it's working fine when you map it with an entity but this one doesn't support multiple requests as it's gets overloaded plus there is no documentation for it or support so if the api goes down so is my app and I couldn't find something similar besides the rome plugin that converts to an object. I want direct conversion to Json.

user2137817
  • 1,825
  • 5
  • 28
  • 45

2 Answers2

0

I'm not sure what you mean by direct conversion to JSON, but you could simply use org.json to convert XML String to JSON String:

String xml = ..
JSONObject jObject = XML.toJSONObject(xml);
String json = jObject.toString();

More discussion here: Converting xml to json using jackson

Community
  • 1
  • 1
janih
  • 2,214
  • 2
  • 18
  • 24
0

I finished by using Rome plugin and built my own JSon structure step by step. no better solution so far.

user2137817
  • 1,825
  • 5
  • 28
  • 45