getting the data in json format