~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/Newtonsoft.Json/Doc/ReadingWritingJSON.aml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
Import upstream version 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<topic id="ReadingWritingJSON" revisionNumber="1">
 
3
  <developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
 
4
    <introduction>
 
5
      <para>To manually read and write JSON Json.NET provides the
 
6
      <codeEntityReference>T:Newtonsoft.Json.JsonReader</codeEntityReference>
 
7
      and 
 
8
      <codeEntityReference>T:Newtonsoft.Json.JsonWriter</codeEntityReference> classes.</para>
 
9
 
 
10
    </introduction>
 
11
    <section>
 
12
      <title>JsonTextReader and JsonTextWriter</title>
 
13
      <content>
 
14
      
 
15
<alert class="note">
 
16
  <para>JsonReader and JsonWriter are low level classes and used internally by Json.NET.
 
17
    To quickly work with JSON either the serializer -
 
18
      <externalLink>
 
19
        <linkText>Serializing and Deserializing JSON</linkText>
 
20
        <linkUri>SerializingJSON.htm</linkUri>
 
21
        <linkTarget>_self</linkTarget>
 
22
      </externalLink>
 
23
      or using <externalLink>
 
24
        <linkText>LINQ to JSON</linkText>
 
25
        <linkUri>LINQtoJSON.htm</linkUri>
 
26
        <linkTarget>_self</linkTarget>
 
27
      </externalLink> is recommended.
 
28
   </para>
 
29
</alert>
 
30
 
 
31
        <para><codeEntityReference>T:Newtonsoft.Json.JsonTextReader</codeEntityReference>
 
32
        and <codeEntityReference>T:Newtonsoft.Json.JsonTextWriter</codeEntityReference>
 
33
        are used to read and write JSON text.
 
34
        The JsonTextWriter has a number of settings on it to control how JSON is formatted
 
35
        when it is written. These options include formatting, indention character, indent
 
36
        count and quote character.</para>
 
37
 
 
38
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\ReadingAndWritingJsonTests.cs" region="ReadingAndWritingJsonText" title="Writing JSON with JsonTextWriter" />
 
39
 
 
40
        <para>JsonTextReader has settings on it for reading different date formats and time zones, and
 
41
        the culture used when reading text values.</para>
 
42
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\ReadingAndWritingJsonTests.cs" region="ReadingJsonText" title="Reading JSON with JsonTextReader" />
 
43
      </content>
 
44
    </section>
 
45
    <section>
 
46
      <title>JTokenReader and JTokenWriter</title>
 
47
      <content>
 
48
        <para><codeEntityReference>T:Newtonsoft.Json.Linq.JTokenReader</codeEntityReference>
 
49
        and <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenWriter</codeEntityReference>
 
50
        read and write LINQ to JSON objects. They are located in the
 
51
        <codeEntityReference>N:Newtonsoft.Json.Linq</codeEntityReference>
 
52
        namespace. These objects allow you to use LINQ to JSON objects with objects that
 
53
        read and write JSON such as the JsonSerializer. For example you can deserialize
 
54
        from a LINQ to JSON object into a regular .NET object and vice versa.</para>
 
55
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\ReadingAndWritingJsonTests.cs" region="ReadingAndWritingJsonLinq" title="Deserializing with JTokenReader" />
 
56
      </content>
 
57
    </section>
 
58
    <relatedTopics>
 
59
      <codeEntityReference>T:Newtonsoft.Json.JsonReader</codeEntityReference>
 
60
      <codeEntityReference>T:Newtonsoft.Json.JsonWriter</codeEntityReference>
 
61
      <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenReader</codeEntityReference>
 
62
      <codeEntityReference>T:Newtonsoft.Json.Linq.JTokenWriter</codeEntityReference>
 
63
      <codeEntityReference>T:Newtonsoft.Json.Bson.BsonReader</codeEntityReference>
 
64
      <codeEntityReference>T:Newtonsoft.Json.Bson.BsonWriter</codeEntityReference>
 
65
    </relatedTopics>
 
66
  </developerConceptualDocument>
 
67
</topic>
 
 
b'\\ No newline at end of file'