JSON .Net Windows Mobile Error when serializing

后端 未结 1 832
死守一世寂寞
死守一世寂寞 2020-12-20 20:02

I am running this bit of code:

 string serialized = JsonConvert.SerializeObject(somethingToSend);

And it throws this exception:

相关标签:
1条回答
  • 2020-12-20 20:42

    So I needed to RTFM! The readme file says:

    Microsoft stopped support for the Compact Framework in Visual Studio 2010. For a Compact Framework 3.5 build download Json.NET 3.5.

    So I grabbed the most recent 3.5 version which is: Json.NET 3.5 Release 8, updated my reference to point to the Newtonsoft.Json.Compact.dll assembly, ran it and it worked fine.

    0 讨论(0)
提交回复
热议问题