-Examples!

This commit is contained in:
James Newton-King
2013-01-26 14:46:05 +13:00
parent 406762b187
commit fd7970a3c3
113 changed files with 1279 additions and 101 deletions
@@ -22,14 +22,14 @@ namespace Newtonsoft.Json.Tests.Documentation.Examples.Linq
{
string json = @"[
{
""Title"": ""Json.NET is awesome!"",
""Author"": {
""Name"": ""James Newton-King"",
""Twitter"": ""@JamesNK"",
""Picture"": ""/jamesnk.png""
'Title': 'Json.NET is awesome!',
'Author': {
'Name': 'James Newton-King',
'Twitter': '@JamesNK',
'Picture': '/jamesnk.png'
},
""Date"": ""2013-01-23T19:30:00"",
""BodyHtml"": ""<h3>Title!</h3>\r\n<p>Content!</p>""
'Date': '2013-01-23T19:30:00',
'BodyHtml': '<h3>Title!</h3>\r\n<p>Content!</p>'
}
]";
@@ -11,12 +11,12 @@ namespace Newtonsoft.Json.Tests.Documentation.Examples.Linq
public void Example()
{
string json = @"{
""channel"": {
""title"": ""Star Wars"",
""link"": ""http://www.starwars.com"",
""description"": ""Star Wars blog."",
""obsolete"": ""Obsolete value"",
""item"": []
'channel': {
'title': 'Star Wars',
'link': 'http://www.starwars.com',
'description': 'Star Wars blog.',
'obsolete': 'Obsolete value',
'item': []
}
}";
@@ -25,7 +25,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Examples.Linq
Console.WriteLine(t3.Type);
// Null
JToken t4 = JToken.Parse(@"""A string!""");
JToken t4 = JToken.Parse(@"'A string!'");
Console.WriteLine(t4.Type);
// String
@@ -13,14 +13,14 @@ namespace Newtonsoft.Json.Tests.Documentation.Examples.Linq
{
string json = @"[
{
""Title"": ""Json.NET is awesome!"",
""Author"": {
""Name"": ""James Newton-King"",
""Twitter"": ""@JamesNK"",
""Picture"": ""/jamesnk.png""
'Title': 'Json.NET is awesome!',
'Author': {
'Name': 'James Newton-King',
'Twitter': '@JamesNK',
'Picture': '/jamesnk.png'
},
""Date"": ""2013-01-23T19:30:00"",
""BodyHtml"": ""<h3>Title!</h3>\r\n<p>Content!</p>""
'Date': '2013-01-23T19:30:00',
'BodyHtml': '<h3>Title!</h3>\r\n<p>Content!</p>'
}
]";
@@ -16,12 +16,12 @@ namespace Newtonsoft.Json.Tests.Documentation.Examples.Linq
public void Example()
{
string json = @"{
""d"": [
'd': [
{
""Name"": ""John Smith""
'Name': 'John Smith'
},
{
""Name"": ""Mike Smith""
'Name': 'Mike Smith'
}
]
}";