开发者

Work with JSON in C# Winforms Application

So I am making an application in C# to read some information from the web, but it is a windows forms application. I get a JSON string, and I need to get some information f开发者_JS百科rom it. I know there is a library for that for C# web applications, but how can I use in in my windows forms application?


There are many JSON libraries out there. Here are three suggestions that you could look into:

  • Json.NET, a fairly popular library for JSON (de-)serialization.

  • ServiceStack's JsonSerializer, according to a comparison in this ServiceStack blog currently the fastest JSON (de-)serializer.

  • I believe the .NET 4 Framework might also have JSON serialization (in the System.Runtime.Serialization.Json namespace from the System.Runtime.Serialization.dll assembly; the namespace seems to have been available in .NET 3.5, but in a different assembly), but I've never looked at it closely.


JSON.NET is useless for VS2012 b/c the nuget packages of JSON.NET are broken for nuget 2.8 and VS2012 cannot get anything newer than nuget 2.8!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜