我正在使用Xamarin.iOS开发iOS应用程序并调用Web服务从服务器获取数据。
我从服务电话
收到以下回复var reqList = {
"lastModified": "2017-02-22T11:18:48.245Z",
"recognitions": "[{\"_id\":\"58a2d13a8d45320c777bc1e2\",\"recognitionImageURL\":\"uploads/recognitions/1487065400656.png\",\"notes\":\"Test\",\"status\":\"Human Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:43:22.536Z\",\"updated\":\"2017-02-22T11:18:48.245Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065400656_thumb.png\",\"plantId\":{\"_id\":\"584682afbd95fa1cd4c9c982\",\"pictures\":[],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Asteraceae\",\"scientificName\":\"Lasthenia glabrata Lindl. ssp. glabrata\",\"commonName\":\"yellowray goldfields\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":\"58411413fcfd4d1386d0cb39\"},{\"_id\":\"58a43e7c1a49602c57100e38\",\"recognitionImageURL\":\"uploads/recognitions/1487158907371.png\",\"notes\":\"Test\",\"status\":\"Invalid Image\",\"__v\":0,\"created\":\"2017-02-15T11:41:48.984Z\",\"updated\":\"2017-02-22T10:05:16.698Z\",\"isDeleted\":false,\"recognitionThumbImageURL\":\"uploads/recognitions/1487158907371_thumb.png\",\"plantId\":null,\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":\"58411413fcfd4d1386d0cb39\"},{\"_id\":\"58a2d1258d45320c777bc1e1\",\"recognitionImageURL\":\"uploads/recognitions/1487065379885.png\",\"notes\":\"Test\",\"status\":\"Human Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:43:01.919Z\",\"updated\":\"2017-02-20T06:48:06.615Z\",\"isDeleted\":false,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065379885_thumb.png\",\"plantId\":{\"_id\":\"584682afbd95fa1cd4c9b432\",\"pictures\":[],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Asteraceae\",\"scientificName\":\"Heliopsis helianthoides (L.) Sweet\",\"commonName\":\"smooth oxeye\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":\"58411413fcfd4d1386d0cb39\"},{\"_id\":\"58a43dfb1a49602c57100e37\",\"recognitionImageURL\":\"uploads/recognitions/1487158777523.png\",\"notes\":\"Test\",\"status\":\"Human Recognition\",\"__v\":0,\"created\":\"2017-02-15T11:39:39.080Z\",\"updated\":\"2017-02-15T11:40:56.018Z\",\"isDeleted\":false,\"recognitionThumbImageURL\":\"uploads/recognitions/1487158777523_thumb.png\",\"plantId\":{\"_id\":\"584682afbd95fa1cd4c9c047\",\"pictures\":[],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Polemoniaceae\",\"scientificName\":\"Ipomopsis roseata (Rydb.) V.E. Grant\",\"commonName\":\"rosy ipomopsis\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":\"58411413fcfd4d1386d0cb39\"},{\"_id\":\"58a2d0748d45320c777bc1e0\",\"recognitionImageURL\":\"uploads/recognitions/1487065202395.png\",\"notes\":\"Test\",\"status\":\"Automated Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:40:04.792Z\",\"updated\":\"2017-02-14T09:40:38.793Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065202395_thumb.png\",\"plantId\":{\"_id\":\"58467f55bd95fa1cd4c83c08\",\"pictures\":[],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Ericaceae\",\"scientificName\":\"Azalea calendulacea Michx.\",\"commonName\":\"\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":null},{\"_id\":\"58a2cffb8d45320c777bc1de\",\"recognitionImageURL\":\"uploads/recognitions/1487065081826.png\",\"notes\":\"Test\",\"status\":\"Automated Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:38:03.937Z\",\"updated\":\"2017-02-14T09:39:19.870Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065081826_thumb.png\",\"plantId\":{\"_id\":\"58467f66bd95fa1cd4c8eb1c\",\"pictures\":[],\"moreOptions\":[{\"name\":\"Height\",\"value\":\"82\"},{\"name\":\"Width\",\"value\":\"150\"},{\"name\":\"Color\",\"value\":\"red\"}],\"careTips\":\"\",\"description\":\"Orchidaceae\",\"scientificName\":\"Miltonia Lindl.\",\"commonName\":\"pansy orchid\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":null},{\"_id\":\"58a2cfec8d45320c777bc1dd\",\"recognitionImageURL\":\"uploads/recognitions/1487065066603.png\",\"notes\":\"Test\",\"status\":\"Automated Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:37:48.750Z\",\"updated\":\"2017-02-14T09:39:16.822Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065066603_thumb.png\",\"plantId\":{\"_id\":\"58467f5ebd95fa1cd4c8d278\",\"pictures\":[\"uploads/plants/1484825291320.jpeg\"],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Asteraceae\",\"scientificName\":\"Leucanthemum vulgare Lam.\",\"commonName\":\"oxeye daisy\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":null},{\"_id\":\"58a2d0058d45320c777bc1df\",\"recognitionImageURL\":\"uploads/recognitions/1487065091889.png\",\"notes\":\"Test\",\"status\":\"Automated Recognition\",\"__v\":0,\"created\":\"2017-02-14T09:38:13.830Z\",\"updated\":\"2017-02-14T09:39:13.854Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487065091889_thumb.png\",\"plantId\":{\"_id\":\"58467f55bd95fa1cd4c83c08\",\"pictures\":[],\"moreOptions\":[],\"careTips\":\"\",\"description\":\"Ericaceae\",\"scientificName\":\"Azalea calendulacea Michx.\",\"commonName\":\"\"},\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":null},{\"_id\":\"58a2c9c68d45320c777bc1dc\",\"recognitionImageURL\":\"uploads/recognitions/1487063490858.png\",\"notes\":\"Test\",\"status\":\"Not Recognized\",\"__v\":0,\"created\":\"2017-02-14T09:11:34.541Z\",\"updated\":\"2017-02-14T09:37:03.745Z\",\"isDeleted\":true,\"recognitionThumbImageURL\":\"uploads/recognitions/1487063490858_thumb.png\",\"plantId\":null,\"userId\":\"58a2c93d8d45320c777bc1db\",\"hrUserId\":null}]",
"status": "success"
}
这就是我的尝试:
var list=reqList["recognitions"];// getting string here
var listInJsonValue=JsonValue.Parse(list);
我想将它转换为jsonValue但是我。在我的应用中获得“指定演员无效”错误。