using JSON in chat app