.net - JSON decoding: Unexpected token: StartArray -


i'm using json.net decode json string , find error:

exception in 'newtonsoft.json.jsonreaderexception' en newtonsoft.json.dll

informaciĆ³n adicional: error reading string. unexpected token: startarray. path 'mentions', line 3, position 3.

the json string this:

{ "mentions":     [         {             "id":"1234",             "alert_id":123,             "title":"bla bla bla",             "url":"http:\/\/www.example.com\/",             "unique_id":"123",             "published_at":"2013-07-30t11:26:36.92131100+00:00",             "created_at":"2013-07-30t11:27:08.0+00:00",             "updated_at":"2013-07-30t11:27:09.0+00:00",             "favorite":false,             "trashed":false,             "trashed_set_by_user":false,             "read":false,             "tone":0,             "tone_score":0.14732,             "relevance_score":1,             "source_type":"forums",             "source_name":"xxx",             "source_url":"http:\/\/example.com\/",             "language_code":"es",             "tasks":[],             "logs":[],             "children":[],             "picture_url":"https:\/\/example.com\/example.jpg"         },         {             "id":"1235",             "alert_id":123,             "title":"bla bla bla",             "url":"http:\/\/www.example.com\/",             "unique_id":"124",             "published_at":"2013-07-30t11:26:36.92131100+00:00",             "created_at":"2013-07-30t11:27:08.0+00:00",             "updated_at":"2013-07-30t11:27:09.0+00:00",             "favorite":false,             "trashed":false,             "trashed_set_by_user":false,             "read":false,             "tone":0,             "tone_score":0.14732,             "relevance_score":1,             "source_type":"forums",             "source_name":"xxx",             "source_url":"http:\/\/example.com\/",             "language_code":"es",             "tasks":[],             "logs":[],             "children":[],             "picture_url":"https:\/\/example.com\/example.jpg"         }     ], "recently_reenabled":false } 

and looks problem in third line '[' starts array of mentions, i've seen error more or less common didn't find solution.

this code:

    dim result new dictionary(of string, string)     dim serializer new system.web.script.serialization.javascriptserializer     dim jsonstring string      jsonstring = txtjson.text      result = jsonconvert.deserializeobject(of dictionary(of string, string))(jsonstring) 

help?

it looks trying deserialize json dictionary(of string, string). however, value of mentions not string; array of objects. try deserializing dictionary(of string, object) instead.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -