Add comments for error handling in JsonRest.