More JSON encoding and client-server talking