handled cases in json parsing