Json support in visual studio 2010

I am trying to work on a new project by analyzing some JSON data for a Silverlight 4 project (specially created as a Silverlight Business Application - Visual C # project) using C # in Visual Studio 2010, and I cannot find how to enable parser links and support native objects for JSON data.

As far as I know, my development tools have been updated (MS update checked).

I know that I can probably just write my own parser, but this is like reinventing the wheel. Below are some lines that work in VS 2008 in our other project (cannot publish files because of their participation in the business application):

using System.Json;

results = (JsonObject) JsonObject.Load (e.Result);

I hope my description will be adequate.

Thanks for watching

jnsohnumr

+4
source share
4 answers

I am using Json.Net. ( http://james.newtonking.com/pages/json-net.aspx ) for serialization.

[Update: http://json.codeplex.com/ for the latest version]

[September 27, 2017 update: https://github.com/JamesNK/Newtonsoft.Json latest version no longer works in visual studio 2010]

+4
source

I am using System.Web.Script.Serialization.JavaScriptSerializer

However, since it does not work in Visual Studio 2010 without customization, you will have to figure out how to make it work on its own.

+5
source

Here you can find a very well written open source solution for parsing JSON data:
http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html

This is not native, but I used it recently and did the job ...

+3
source

Add a link to System.Json. Add a link to System.Json. I just did it and now my usage instruction is working fine.

+1
source

Source: https://habr.com/ru/post/1309486/


All Articles