Server returns json to client