I have, for years, been trying to get FeatureCollection.FromJson to work, but it just doesn't. I must be doing something simple wrong. I am using Microsoft Visual Studio Community 2019 (VB.NET), and latest Esri.ArcGISRuntime 100.11.2.
I have a simple code fragment
Dim fs As New FeatureCollection
fs = FeatureCollection.FromJson(responseStr)
responseStr contains the geojson string below. After execution, fs is empty with no runtime failure.
I have had to resort to using the Newtonsoft.Json package to decode the json, which has no problem with it.
What am I doing wrong? (How can something so simple be so hard?)
{
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"features": [
{
"type": "Feature",
"id": 1158,
"geometry": null,
"properties": {
"objectid": 1158,
"featuretype": "Railway Station",
"type": 1,
"name": "ABERDEEN",
"railstationstatus": "Operational",
"featurereliability": 1103587200000,
"featuresource": "SP5PAN2P5_388415_21122004",
"attributereliability": 1189728000000,
"attributesource": "GEOSCIENCE AUSTRALIA",
"planimetricaccuracy": 10,
"revised": 1239667200000,
"gaid": null,
"stkehdrid": null,
"stkehdrname": null,
"upperscale": 5000000,
"uscertainty": "Definite",
"textnote": null,
"editcode": 88,
"symbol100k": 222,
"symbol250k": 222,
"symbolwac1mil": 2,
"symbol2_5mil": 2,
"symbol5mil": 2
}
}
]
}