Add documentation and split JSON Path into its own documentation section (#1925)

This commit is contained in:
James Newton-King
2018-11-26 23:10:30 +13:00
committed by GitHub
parent f869558de5
commit 2171a88e5e
21 changed files with 377 additions and 26 deletions
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="ErrorWhenNoMatchQuery" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This sample loads JSON and then queries values from it using <codeEntityReference>Overload:Newtonsoft.Json.Linq.JToken.SelectToken</codeEntityReference>. An error is thrown when part of the JSON path is not found.</para>
</introduction>
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\ErrorWhenNoMatchQuery.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -7,7 +7,7 @@
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Linq\QueryJsonSelectToken.cs" region="Usage" title="Usage" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\QueryJsonSelectToken.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
@@ -7,7 +7,7 @@
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Linq\QueryJsonSelectTokenEscaped.cs" region="Usage" title="Usage" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\QueryJsonSelectTokenEscaped.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
@@ -11,7 +11,7 @@
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Linq\QueryJsonSelectTokenJsonPath.cs" region="Usage" title="Usage" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\QueryJsonSelectTokenJsonPath.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
@@ -8,7 +8,7 @@
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Linq\QueryJsonSelectTokenWithLinq.cs" region="Usage" title="Usage" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\QueryJsonSelectTokenWithLinq.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="RegexQuery" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This sample loads JSON and then queries values from it using <codeEntityReference>M:Newtonsoft.Json.Linq.JToken.SelectToken(System.String)</codeEntityReference> with a regex JSON Path.</para>
</introduction>
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\RegexQuery.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="StrictEqualsQuery" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This sample loads JSON and then queries values from it using <codeEntityReference>M:Newtonsoft.Json.Linq.JToken.SelectToken(System.String)</codeEntityReference> with a strict equals JSON Path.</para>
</introduction>
<section>
<title>Sample</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\JsonPath\StrictEqualsQuery.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -2,8 +2,8 @@
<topic id="CustomJsonConverterGeneric" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This sample creates a custom <codeEntityReference>T:Newtonsoft.Json.JsonConverter{T}</codeEntityReference>
that overrides serialization for the Version property with a custom display string.</para>
<para>This sample creates a custom converter from <c>JsonConverter&lt;T&gt;</c>
that overrides serialization for the <c>Version</c> class with a custom display string.</para>
</introduction>
<section>
<title>Sample</title>