Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Work with JSON in C# Winforms Application

Tags:

json

c#

winforms

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?

like image 668
Cokegod Avatar asked Mar 20 '11 22:03

Cokegod


1 Answers

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.

like image 149
stakx - no longer contributing Avatar answered Sep 21 '22 05:09

stakx - no longer contributing