Added error parsing for XML JSON