save cookie data in json format