JSON message passing works properly