Try parsing json and fallback to xml if failed