1

I am calling a data service from a jaggery js app using http://jaggeryjs.org/apidocs/ws.jag . The data comes back in XML with members .responseText and .responseE4X. Is there an easy way to convert this response to JSON? Is there a parameter I can set to have this respond with JSON? This is being run in the server side, so I do not have access to window(), which most XML to JSON converters use.

Thanks!

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Chris Ridmann
  • 2,836
  • 4
  • 18
  • 19
  • Also, E4X appears to be bugged: is returns undefined in code and in the "try it" service: http://jaggeryjs.org/apidocs/xml.jag – Chris Ridmann Jun 17 '13 at 03:13

1 Answers1

1

I did this by using the post method: http://jaggeryjs.org/apidocs/post.jag

It is worth noting that there is a bug in this as well. I had to set the content type header as "content-type" and not "Content-Type".

Chris Ridmann
  • 2,836
  • 4
  • 18
  • 19