It will be more efficient if you explain what you think the options are. Then I'll happily comment. I've said a lot on this subject before - you can probably find my comments using the Search button.
...
Your XML to JSON solution is not 100% reliable. When the XML array only contains one member you will output a JSON object. When the array contains two or more members you will output a JSON array. Tha ...