[#65804068] corrected malformed JSON with judicious use of gsub