added try/catch to parseJson