You probably need to handle exceptions from malformed JSON.