apply json data and try catch