May-05-2020, 01:51 PM
Hi,
I need to get rid of " from a JSON file
I have a JSON file like this:
I can't find any viable solution, because I can't get rid of all the " from my file and i can't convert coordniates into float directly because of the [] .. such as this solution : https://stackoverflow.com/questions/3667...rom-python
Do you have any idea ? thank you in advance.
I need to get rid of " from a JSON file
I have a JSON file like this:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Ville": "OZAN" }, "geometry": { "type": "Point", "coordinates": [ "4.91667, 46.3833" ] } }, { "type": "Feature", "properties": { "Ville": "CORMORANCHE-SUR-SAONE" }, "geometry": { "type": "Point", "coordinates": [ "4.83333, 46.2333" ] } },I need to remove the " before and after the coordinates in order to get this.
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Ville": "OZAN" }, "geometry": { "type": "Point", "coordinates": [ 4.91667, 46.3833 ] } }, { "type": "Feature", "properties": { "Ville": "CORMORANCHE-SUR-SAONE" }, "geometry": { "type": "Point", "coordinates": [ 4.83333, 46.2333 ] } },I can't do it manually because i about 35k cities.
I can't find any viable solution, because I can't get rid of all the " from my file and i can't convert coordniates into float directly because of the [] .. such as this solution : https://stackoverflow.com/questions/3667...rom-python
Do you have any idea ? thank you in advance.