sending data as a json object