I am trying to convert a JSON
file into a feature. My code was working fine until today and now I am getting the following error - ExecuteError: ERROR 001558: Error parsing json file '<filepath>'. The workspace is not connected.
.
I tried it manually in ArcMap
using this proceedure:
- I first checked that the JSON file looked correct (had all the prerequisites like geometryType, Features, etc...).
- In arcMap (10.5), I went to toolbox > Conversion Tools > JSON > JSON To Features.
- I input the filepath to the .json file and then made sure the output went to a .gdb.
- I double checked the filepaths.
Same results: ERROR 001558. I even tried the default output, which went to the ArcGIS\Default.gdb. I also got the same error:
ExecuteError: ERROR 001558: Error parsing json file ''. The workspace is not connected. Failed to execute (JSONToFeatures).
In researching this issue, I found the ArcGIS Pro page on 001558: Error parsing .json file <value>
which states that the The JSON must have at least the geometryType, spatialReference, fields, and features (with geometry and attributes) property.
I checked the data and it has
geometryType
, spatialReference
, fields
, and features
which have attributes
and geometry
.
{"displayFieldName": "CSLF_ID",
"fieldAliases": {...},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"fields": [...],
"features": [
{"attributes": {...},
"geometry": {...}
},...]}
So, I am wondering if there might be something else causing the error. Or can anyone see an issue with the JSON file above?