JSON .Net Windows Mobile Error when serializing

后端 未结 1 831
死守一世寂寞
死守一世寂寞 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)
提交回复
热议问题