Client-server communication now uses JSON instead of a string