How do I convert JSON to XML?

smooshie

Newbie
Joined
Dec 27, 2009
Messages
18
Reaction score
2
I'm working with an api that only returns json. I know there are ways to parse json with php as well, but i'm much more comfortable with xml. Any ideas how to convert it?
 
Check this:

Code:
http://goessner.net/download/prj/jsonxml/
 
JSON is sooo much easier to parse... Just use json_decode() and you'll instantly have all the values as variables...
 
Last edited:
JSON is sooo much easier to parse... Just use json_decode and you'll instantly have all the values as variables...
This. Why do you feel it necessary to go to XML? What's bothering you w/ JSON?
 
Back
Top