Subversion Repository Public Repository

ChrisCompleteCodeTrunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="utf-8"?>
<topic id="SelectToken" revisionNumber="1">
  <developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
    <introduction>
      <para>
      <codeEntityReference>Overload:Newtonsoft.Json.Linq.JToken.SelectToken</codeEntityReference>
      provides a method to query LINQ to JSON using a single string path to a desired
      <codeEntityReference>T:Newtonsoft.Json.Linq.JToken</codeEntityReference>.
      SelectToken makes dynamic queries easy because the entire query is defined in a string.</para>
    </introduction>
    <section>
      <title>SelectToken</title>
      <content>
        <!-- Uncomment this to create a sub-section outline
        <autoOutline /> -->
        <para>SelectToken is a method on JToken and takes a string path to a child token.
        SelectToken returns the child token or a null reference if a token couldn't be
        found at the path's location.</para>
        <para>The path is made up of property names and array indexes separated by periods,
        e.g. <codeInline>Manufacturers[0].Name</codeInline>.</para>

<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\LinqToJsonTests.cs" region="SelectTokenComplex" title="SelectToken Example" />
      </content>
    </section>
    <section>
      <title>SelectToken with JSONPath</title>
      <content>
        <para>SelectToken supports JSONPath queries. Find out more about JSONPath <externalLink>
<linkText>here</linkText>
<linkUri>http://goessner.net/articles/JsonPath/</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>.</para>

        <code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Linq\QueryJsonSelectTokenJsonPath.cs" region="Usage" title="SelectToken With JSONPath" />
      </content>
    </section>
    <section>
      <title>SelectToken with LINQ</title>
      <content>
        <!-- Uncomment this to create a sub-section outline
        <autoOutline /> -->
        <para>SelectToken can be used in combination with standard LINQ methods.</para>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\LinqToJsonTests.cs" region="SelectTokenLinq" title="SelectToken With LINQ Example" />
      </content>
    </section>
    <relatedTopics>
      <link xlink:href="LINQtoJSON" />

      <codeEntityReference>Overload:Newtonsoft.Json.Linq.JToken.SelectToken</codeEntityReference>
    </relatedTopics>
  </developerConceptualDocument>
</topic>

Commits for ChrisCompleteCodeTrunk/M3Workflow/Libraries/Json90r1/Source/Doc/SelectToken.aml

Diff revisions: vs.
Revision Author Commited Message
1 BBDSCHRIS picture BBDSCHRIS Wed 22 Aug, 2018 20:08:03 +0000