add try catch exception to json parsing