-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
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="CreateJsonSchemaManually" 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.Schema.JsonSchema</codeEntityReference>
instance programmatically instead of loading a schema from JSON.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\CreateJsonSchemaManually.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="JTokenIsValid" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example validates a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
using the <codeEntityReference>M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema)</codeEntityReference>
extension method.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JTokenIsValid.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JTokenIsValidWithMessages" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example validates a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
using the <codeEntityReference>M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema)</codeEntityReference>
extension method and returns error messages.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JTokenIsValidWithMessages.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JTokenValidateWithEvent" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example validates a <codeEntityReference>T:Newtonsoft.Json.Linq.JObject</codeEntityReference>
using the <codeEntityReference>M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema)</codeEntityReference>
extension method and raises an event for each validation error.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JTokenValidateWithEvent.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="JsonSchemaParse" 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 <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
from JSON</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JsonSchemaParse.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="JsonValidatingReaderAndSerializer" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example validates JSON when deserializing an object using
<codeEntityReference>T:Newtonsoft.Json.JsonValidatingReader</codeEntityReference>.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JsonValidatingReaderAndSerializer.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\JsonValidatingReaderAndSerializer.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="LoadJsonSchemaFromFile" 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 a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
from a file.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\LoadJsonSchemaFromFile.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="RefJsonSchemaResolver" 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.Schema.JsonSchemaResolver</codeEntityReference>
to resolve schema references from different JSON documents.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\RefJsonSchemaResolver.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="SaveJsonSchemaToFile" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>This example saves a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
to a file.</para>
</introduction>
<section>
<title>Example</title>
<content>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Examples\Schema\SaveJsonSchemaToFile.cs" region="Usage" title="Usage" />
</content>
</section>
</developerConceptualDocument>
</topic>