Using JSON for server client communication