I am uploading some Points and Lines into ArcGIS Online hosted feature services using a python program the ArcGIS Rest Api. The points work fine but I am having trouble getting the correct format for adding the lines.
For the Points:
{
"features":
"geometry": {
"x": x,
"y": y
},
"attributes": {
"RECORD_ID": RECORD_ID,
"DEVICE_ID": DEVICE_ID,
"DATE_TIME": DATE_TIME,
"LONGITUDE": LONGITUDE,
"LATITUDE": LATITUDE,
}
}
Works.
For the lines If have tried:
{
"features":
"paths":[
[x,y],[x1,y1]],
"spatialReference": {"wkid" : 4326},
"attributes": {
"RECORD_ID": RECORD_ID,
"DEVICE_ID": DEVICE_ID,
"DEVICE_NAME": DEVICE_NAME,
"DATE_TIME": DATE_TIME,
"SPEED": SPEED,
"HEADING": HEADING,
}
}
FAILS.
The error I get is:
"No JSON object could be decoded"
Any idea what I am doing wrong?
Thanks
Larry