DropNetRT を使用して Dropbox と統合しようとしていますが、Dropbox API からの JSON 応答をデシリアライズする時点で一貫してエラーが発生します。難しい話は抜きにして:
スローされる例外は
Newtonsoft.Json.JsonReaderException occurred
HResult=-2146233088
Message=Error reading string. Unexpected token: StartObject. Path 'entries[0][1]', line 1, position 202.
Source=Newtonsoft.Json
LineNumber=1
LinePosition=202
Path=entries[0][1]
例外がスローされますvar deltaResponse = JsonConvert.DeserializeObject<DeltaPageInternal>(responseBody);
なにresponseBody
?それはこの男です(みんなの便宜のために少し単純化されています:
{
"has_more": true,
"cursor": "BLAGHABLAGAbigDarn-StringTHing123",
"entries":
[
["/exampleFile.pdf", {"revision": 1, "rev": "1131aa664", "thumb_exists": false, "bytes": 249159, "modified": "Mon, 12 Aug 2013 18:55:30 +0000", "client_mtime": "Mon, 12 Aug 2013 18:55:30 +0000", "path": \"/exampleFole.pdf\", "is_dir": false, "icon": "page_white_acrobat", "root": "dropbox", "mime_type": "application/pdf", "size": "243.3 KB"}],
["/examplefolder", {"revision": 2, "rev": "2131aa664", "thumb_exists": false, "bytes": 0, "modified": "Tue, 13 Aug 2013 17:30:35 +0000", "path": "/examplefolder", "is_dir": true, "icon": "folder_user", "root": "dropbox", "size": "0 bytes"}]
],
"reset": true
}
DeltaPageInternal
エントリー[0][1]は実際にはモデルが暗示しているように見えるものではないため、モデルが原因であると私は疑っています。
internal class DeltaPageInternal
{
public string Cursor { get; set; }
public bool Has_More { get; set; }
public bool Reset { get; set; }
public List<List<string>> Entries { get; set; }
}
他の誰かがこの問題を抱えていますか?Dropbox から取得した応答のタイプを考えると、かなり普及しているように思えます... 古い API バージョンか何かを呼び出しているのでしょうか?
いつものように、専門知識をお寄せいただきありがとうございます。