2165 people following this project (follow)

Documentation

Json.NET documentation can be found here.



Last edited May 7 at 9:20 AM by JamesNK, version 3

Comments

samjohn1969 Nov 3 2011 at 2:20 PM 
thanks for the explanation "mfreidge"

Caldas Oct 27 2011 at 10:02 PM 
Link is with problems !!

broberson Aug 7 2011 at 10:41 PM 
No. No, you can't.

In Javascript, you can use single quoted strings if you like. JSON is an interchange format based on Javascript's object-literal syntax, but it is not Javascript. It's a subset of Javascript. Strings in JSON are double-quoted. Property names in JSON are double-quoted. Double-quotes inside strings are backslash-escaped. Single quotes are just another character.

Json.NET is written to work with malformed data, but that doesn't mean it's okay to produce malformed data.

mfreidge Jun 5 2011 at 1:44 AM 
In documentation, you are using double-double quotes in json strings, e.g.
JObject o = JObject.Parse(@"{ ""Stores"": [ ""Lambton Quay"", ""Willis Street""}");

Note that you can use single quotes in json data, declared within a string. In this case you will not need to escape double-quotes(")
e.g. JObject o = JObject.Parse(@"{ 'Stores': [ 'Lambton Quay', 'Willis Street'}");
It's easier to read.