Error catching JSON methods