在C#Winforms应用程序中使用JSON [英] Work with JSON in C# Winforms Application
问题描述
因此,我正在使用C#编写应用程序以从Web读取一些信息,但这是Windows窗体应用程序.我得到一个JSON字符串,我需要从中获取一些信息.我知道有一个用于C#Web应用程序的库,但是如何在Windows窗体应用程序中使用它?
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 from it. I know there is a library for that for C# web applications, but how can I use in in my windows forms application?
推荐答案
那里有许多JSON库.您可以考虑以下三个建议:
There are many JSON libraries out there. Here are three suggestions that you could look into:
-
Json.NET ,一个相当流行的JSON(反序列化)库.
Json.NET, a fairly popular library for JSON (de-)serialization.
ServiceStack的JsonSerializer ="http://mono.servicestack.net/mythz_blog/?p=344" rel ="nofollow" title =由Mythz发行的.NET最快的JSON序列化程序",此ServiceStack博客中的比较当前最快的JSON(反)序列化器.
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.
这篇关于在C#Winforms应用程序中使用JSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!