added json to try catch