Stringified JSON or XML ....................... Set the ``as_string`` input argument to ``True`` for the ``.get_json()`` or ``.get_xml()`` methods if you wish to receive stringified JSON or XML entities: .. code-block:: python from uk_covid19 import Cov19API all_nations = [ "areaType=nation" ] cases_and_deaths = { "date": "date", "areaName": "areaName", "areaCode": "areaCode", "newCasesByPublishDate": "newCasesByPublishDate", "cumCasesByPublishDate": "cumCasesByPublishDate", "newDeathsByDeathDate": "newDeathsByDeathDate", "cumDeathsByDeathDate": "cumDeathsByDeathDate" } api = Cov19API( filters=all_nations, structure=cases_and_deaths, latest_by="newCasesByPublishDate" ) json_data = api.get_json(as_string=True) print("JSON:", json_data) xml_data = api.get_xml(as_string=True) print("XML:", xml_data) :: JSON: {"data":[{"date":"2020-08-09","areaName":"England","areaCode":"E92000001","newCasesByPublishDate":988,"cumCasesByPublishDate":268312,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Northern Ireland","areaCode":"N92000002","newCasesByPublishDate":0,"cumCasesByPublishDate":null,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Scotland","areaCode":"S92000003","newCasesByPublishDate":48,"cumCasesByPublishDate":18998,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Wales","areaCode":"W92000004","newCasesByPublishDate":26,"cumCasesByPublishDate":17451,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null}],"lastUpdate":"2020-08-09T17:56:52.000000Z","length":4,"totalPages":1} XML: 2020-08-09EnglandE920000019882683122020-08-09Northern IrelandN9200000202020-08-09ScotlandS9200000348189982020-08-09WalesW9200000426174512020-08-09T17:56:52.000000Z41