I've got a big string file (originally geojson) that I need to rectify before using it in my android project.
I explain : i've converted a shapefile into a geojson file but the converter did something wrong. He puts a double array for the coordinates, and android is unnable to parse it.
{
"type": "Feature",
"properties": {
"id": 00001,
"poi": "cinemas",
"other": "null"
},
"geometry": {
"type": "MultiPoint",
"coordinates": [
[ // here is the unwanted character #1
7.0000000000000,
48.0000000000000
] // here is the unwanted character #2
]
}
}
How to generate a proper string that remove line 11 & 14 for each Json object in this string ?
I tried this, but wasn't working :
string[] x = myJsonString.Split('\n');
x.Remove(x.LastIndexOf(Environment.NewLine)-4);
x.Remove(x.LastIndexOf(Environment.NewLine)-7);
Am I in the wrong way ? Or StringBuilder can do it ? Thanks in advance !