1
<?xml version="1.0" encoding="utf-8"?>
2
<topic id="SerializingJSONFragments" revisionNumber="1">
3
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
6
<para>Often when working with large JSON documents you're only interested in a small
7
fragment of information. This scenario can be annoying when you want to serialize
8
that Json.NET into .NET objects because you have to define .NET classes for the
9
entire JSON result.</para>
10
<para>With Json.NET it is easy to get around this problem. Using LINQ to JSON you
11
can extract the pieces of JSON you want to serialize before passing them to the
12
Json.NET serializer.</para>
14
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs" region="SerializingPartialJsonFragmentsObject" title="Fragments Object" />
15
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs" region="SerializingPartialJsonFragmentsExample" title="Serializing Partial JSON Fragment Example" />
19
<codeEntityReference>T:Newtonsoft.Json.JsonReader</codeEntityReference>
20
<codeEntityReference>T:Newtonsoft.Json.JsonWriter</codeEntityReference>
21
<codeEntityReference>T:Newtonsoft.Json.Linq.JTokenReader</codeEntityReference>
22
<codeEntityReference>T:Newtonsoft.Json.Linq.JTokenWriter</codeEntityReference>
23
<codeEntityReference>T:Newtonsoft.Json.Bson.BsonReader</codeEntityReference>
24
<codeEntityReference>T:Newtonsoft.Json.Bson.BsonWriter</codeEntityReference>
26
</developerConceptualDocument>
b'\\ No newline at end of file'