开发者

JSON Error when trying to fetch data in iPhone App

Getting following error message when I try to fetch JSON response into my app.

{"Message":"The type initializer for \u0027Newtonsoft.Json.JsonWriter\u0027 threw an exception.","StackTrace":" at Newtonsoft.Json.JsonWriter.AutoComplete(JsonToken tokenBeingWritten)\r\n at Newtonsoft.Json.JsonTextWriter.WriteStartArray()\r\n at Newtonsoft.Json.Converters.DataTableConverter.WriteJson(JsonWriterwriter, Object value, JsonSerializer serializer)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContract collectionValueContract)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Objec开发者_运维知识库t value)\r\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)\r\n at Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Formatting formatting, JsonSerializerSettings settings)\r\n at Newtonsoft.Json.JsonConvert.SerializeObject(Object value)\r\n at NewHive.MyServ.getHiveData(String Market, Int32 UserID) in

C:\VSS Working Folder\25 April 11 NewHive\NewHive\MyServ.asmx.cs:line 2006","ExceptionType":"System.TypeInitializationException`"}

Please help me to solve this error.


Finally I got solution to this. Initally I was using Newton JSON 2.0 DLL. I changed it to Newton JSON 3.0 DLL and it started working fine.

Hope this helps someone having similar issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜