send data over JSON instead of strings