Adding try/catch around json parsing.