I have a custom .net web service that returns ESRI's json format. I am having trouble getting the results to map. Here is a sample of the json:
{"geometryType":"esriGeometryPolyline",
"spatialReference":{"wkid":4326},
"fields":[
{"name":"OID","type":"esriFieldTypeInteger","alias":"OID"},
{"name":"OBJECTID","type":"esriFieldTypeBigInteger","alias":"OBJECTID"},
{"name":"Id","type":"esriFieldTypeUnknown","alias":"Id"},
{"name":"GNIS_Name","type":"esriFieldTypeString","alias":"GNIS_Name"},
{"name":"Hydro_ID","type":"esriFieldTypeUnknown","alias":"Hydro_ID"},
{"name":"Name","type":"esriFieldTypeString","alias":"Name"},
{"name":"Feature","type":"esriFieldTypeString","alias":"Feature"},
{"name":"F_Code","type":"esriFieldTypeBigInteger","alias":"F_Code"},
{"name":"State","type":"esriFieldTypeString","alias":"State"},
{"name":"State_FIPS","type":"esriFieldTypeString","alias":"State_FIPS"},
{"name":"Region","type":"esriFieldTypeBigInteger","alias":"Region"},
{"name":"NHD_RCode","type":"esriFieldTypeString","alias":"NHD_RCode"},
{"name":"NHD_ComID","type":"esriFieldTypeUnknown","alias":"NHD_ComID"},
{"name":"GNIS_ID","type":"esriFieldTypeString","alias":"GNIS_ID"},
{"name":"From_Node","type":"esriFieldTypeUnknown","alias":"From_Node"},
{"name":"To_Node","type":"esriFieldTypeUnknown","alias":"To_Node"},
{"name":"Length_mi","type":"esriFieldTypeUnknown","alias":"Length_mi"},
{"name":"Enabled","type":"esriFieldTypeBigInteger","alias":"Enabled"},
{"name":"GM_f_code","type":"esriFieldTypeString","alias":"GM_f_code"},
{"name":"GM_hyc","type":"esriFieldTypeBigInteger","alias":"GM_hyc"},
{"name":"GM_lit","type":"esriFieldTypeBigInteger","alias":"GM_lit"},
{"name":"GM_nam","type":"esriFieldTypeString","alias":"GM_nam"},
{"name":"GM_soc","type":"esriFieldTypeString","alias":"GM_soc"},
{"name":"GM_exs","type":"esriFieldTypeBigInteger","alias":"GM_exs"},
{"name":"Shape_Leng","type":"esriFieldTypeUnknown","alias":"Shape_Leng"}],
"features":[
{"attributes":{"OID":1,"OBJECTID":2,"Id":0,"GNIS_Name":"Clarks River","Hydro_ID":6008640,"Name":"Clarks River","Feature":"Stream","F_Code":4,"State":"KY","State_FIPS":"21","Region":6,"NHD_RCode":"06040006000075","NHD_ComID":1863538,"GNIS_ID":"00489552","From_Node":0,"To_Node":1,"Length_mi":0.1423984,"Enabled":1,"GM_f_code":"BH140","GM_hyc":9,"GM_lit":9,"GM_nam":"Clarks River","GM_soc":"USA","GM_exs":1,"Shape_Leng":0.002271788},
"geometry":{"paths":[[[-88.2817643199999,36.7790401180001],[-88.2834317879999,36.7805830280001]]]}}]}
Ive tried this: featureSet = com.esri.ags.FeatureSet.fromJSON(event.toString());
but get this error JSONParseError: Unexpected R encountered
at com.esri.serialization.json::JSONTokenizer/parseError()
ANY help would be appreciated!!