-Samples!

This commit is contained in:
James Newton-King
2013-01-28 21:03:56 +13:00
parent 5d190ac7b8
commit 849f7a9fa8
101 changed files with 0 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="Clone" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example clones LINQ to JSON objects and all the cloned object's child values.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\Clone.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonAnonymousObject" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
from an anonymous type.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonAnonymousObject.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonAnonymousObject.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonCollectionInitializer" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference> instances using
the C# collection initializer syntax.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonCollectionInitializer.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonDeclaratively" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference> instances declaratively
using LINQ.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonDeclaratively.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonDeclaratively.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonDynamic" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference> instances using
the C# dynamic functionality.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonDynamic.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonJTokenWriter" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference> instances using
a <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenWriter</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonJTokenWriter.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonManually" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference> instances one at a time
programatically.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateJsonManually.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateReader" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates a <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenReader</codeEntityReference>
from a <codeEntityReference>T:Newtonsoft.Json.Linq.JToken</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateReader.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateWriter" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example creates a <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenWriter</codeEntityReference>
from a <codeEntityReference>T:Newtonsoft.Json.Linq.JToken</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\CreateWriter.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="DeepEquals" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example compares <codeEntityReference>T:Newtonsoft.Json.Linq.JToken</codeEntityReference>
instances using <codeEntityReference>M:Newtonsoft.Json.Linq.JToken.DeepEquals</codeEntityReference>,
comparing the token and all child tokens.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\DeepEquals.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="DeserializeWithLinq" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example uses LINQ to JSON to manually convert JSON to a .NET type.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\DeserializeWithLinq.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\DeserializeWithLinq.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="FromObject" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example converts .NET values to LINQ to JSON using
<codeEntityReference>M:Newtonsoft.Json.Linq.JToken.FromObject(System.Object)</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\FromObject.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\FromObject.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JObjectProperties" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example gets an object's <codeEntityReference>T:Newtonsoft.Json.Linq.JProperty</codeEntityReference>
collection using <codeEntityReference>M:Newtonsoft.Json.Linq.JObject.Properties</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\JObjectProperties.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JValueCast" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example casts <codeEntityReference>T:Newtonsoft.Json.Linq.JValue</codeEntityReference>
instances to .NET values.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\JValueCast.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JValueValue" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example gets <codeEntityReference>T:Newtonsoft.Json.Linq.JValue</codeEntityReference>
internal values using <codeEntityReference>P:Newtonsoft.Json.Linq.JValue.Value</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\JValueValue.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ModifyJson" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON, modifies <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
and <codeEntityReference>T:Newtonsoft.Json.Linq.JArray</codeEntityReference>
instances and then writes the JSON back out again.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ModifyJson.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ParseJsonAny" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example parses JSON using
<codeEntityReference>M:Newtonsoft.Json.Linq.JToken.Parse</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ParseJsonAny.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ParseJsonArray" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example parses a JSON array using
<codeEntityReference>M:Newtonsoft.Json.Linq.JArray.Parse</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ParseJsonArray.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ParseJsonObject" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example parses a JSON object using
<codeEntityReference>M:Newtonsoft.Json.Linq.JObject.Parse</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ParseJsonObject.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="QueryJson" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON and then queries values from it using
<codeEntityReference>T:Newtonsoft.Json.Linq.JToken.Items(System.Object)</codeEntityReference> indexer
and then casts the returned tokens to .NET values.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\QueryJson.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="QueryJsonDynamic" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON and then queries values from it using
C# dynamic functionality.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\QueryJsonDynamic.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="QueryJsonLinq" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON and then queries values from it using LINQ operators.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\QueryJsonLinq.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="QueryJsonSelectToken" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON and then queries values from it using <codeEntityReference>T:Newtonsoft.Json.Linq.JToken.SelectToken(System.String)</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\QueryJsonSelectToken.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="QueryJsonSelectTokenWithLinq" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example loads JSON and then queries values from it using a combination of <codeEntityReference>T:Newtonsoft.Json.Linq.JToken.SelectToken(System.String)</codeEntityReference>
and LINQ operators.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\QueryJsonSelectTokenWithLinq.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ReadJTokenFromBson" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example reads a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
from BSON using <codeEntityReference>T:Newtonsoft.Json.Bson.BsonReader</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ReadJTokenFromBson.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ReadJson" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example reads JSON from a file into a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ReadJson.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="SerializeWithLinq" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example uses LINQ to JSON to manually convert a .NET type to JSON.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\SerializeWithLinq.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\SerializeWithLinq.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ToObjectComplex" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example converts LINQ to JSON objects to .NET types using
<codeEntityReference>T:Newtonsoft.Json.Linq.JToken.ToObject`1</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ToObjectComplex.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ToObjectGeneric" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example converts LINQ to JSON objects to .NET types using
<codeEntityReference>T:Newtonsoft.Json.Linq.JToken.ToObject`1</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ToObjectGeneric.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ToObjectType" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example converts LINQ to JSON objects to .NET types using
<codeEntityReference>M:Newtonsoft.Json.Linq.JToken.ToObject(System.Type)</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ToObjectType.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ToString" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example converts LINQ to JSON objects to JSON.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ToString.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ToStringJsonConverter" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example uses a <codeEntityReference>T:Newtonsoft.Json.JsonConverter</codeEntityReference>
to customize converting LINQ to JSON objects to JSON.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\ToStringJsonConverter.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="WriteJTokenToBson" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example writes a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
to BSON using <codeEntityReference>T:Newtonsoft.Json.Bson.BsonWriter</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\WriteJTokenToBson.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="WriteToJsonFile" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example writes LINQ to JSON objects to a file.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Linq\WriteToJsonFile.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>