fixed R json error where double quote from the error message is eliminated to satisfy JSON parsing