server to return data in json