Closed adityasatalkar closed 4 years ago
I propose updating the JSON format to have a JSON array to make it simpler to parse it easily in a dynamic manner.
Current JSON format
{ "Afghanistan": [{ "date": "2020-1-22", "confirmed": 0, "deaths": 0, "recovered": 0 }, { "date": "2020-1-23", "confirmed": 0, "deaths": 0, "recovered": 0 } ], "Albania": [{ "date": "2020-1-22", "confirmed": 0, "deaths": 0, "recovered": 0 }, { "date": "2020-1-23", "confirmed": 0, "deaths": 0, "recovered": 0 } ] }
Proposed JSON format
{ "countryWise": [ { "country": "Afghanistan", "timeSeries": [ { "date": "2020-4-16", "confirmed": 840, "deaths": 30, "recovered": 54 }, { "date": "2020-4-16", "confirmed": 840, "deaths": 30, "recovered": 54 } ] }, { "country": "Albania", "timeSeries": [ { "date": "2020-4-16", "confirmed": 840, "deaths": 30, "recovered": 54 }, { "date": "2020-4-16", "confirmed": 840, "deaths": 30, "recovered": 54 } ] }, { "country": "Unknown", "timeSeries": [ { "date": "2020-4-16", "confirmed": 840, "deaths": 30, "recovered": 54 } ] } ] }
Hi, I don't think that's worth a new major version. It may be simpler for some use cases but it's harder for others.
Feel free to fork the repo if you really need the JSON with that structure.
I propose updating the JSON format to have a JSON array to make it simpler to parse it easily in a dynamic manner.
Current JSON format
Proposed JSON format