The value part of a GP Result can be any type of GP object (or literal).
Does anyone know of a general way to deserialize this, preferably with either WCF or Json.NET?
I'd prefer not to have to write a deserializer for each different GP tool.
{
"results":[
{
"paramName":"Output",
"dataType":"GPFeatureRecordSetLayer",
"value":{
"geometryType":"esriGeometryPolyline",
"spatialReference":{
"wkid":4326
},
"features":[
{
"geometry":{
"paths":[
[
[
-91.6849975582907,
24.206096649241
],
[
-91.8398132323948,
24.4056720735074
]
]
]
},
"attributes":{
"FID":1,
"FNODE_":0,
"Shape_Length":0.25258314060805
}
}
],
"exceededTransferLimit":"false"
}
}
],
"messages":[
]
}
Update: I never figured out a way to do this. If Esri wants to encourage consumption of GP services by a wider variety of clients they should consider serializing the .NET type name, similar to what can be done with Json.NET by setting TypeNameHandling = Objects.
