corrected parsing of JSON