-Marked old JsonSchema implementation as obsolete

This commit is contained in:
James Newton-King
2014-12-29 12:15:18 +13:00
parent a2e15adf80
commit c714bae747
59 changed files with 610 additions and 108 deletions
+5 -9
View File
@@ -16,16 +16,12 @@
<alert class="caution">
<para>
The JSON Schema standard isn't final.
Json.NET implements
<externalLink>
<linkText>JSON Schema Draft 3</linkText>
<linkUri>https://tools.ietf.org/html/draft-zyp-json-schema-03</linkUri>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>.
There will be breaking changes to some parts of Json.NET's JSON Schema API when it is updated to implement newer drafts of JSON Schema.
</externalLink>
for more details.
</para>
</alert>
@@ -5,6 +5,16 @@
<para>This sample creates a new <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
instance manually in code.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
+10
View File
@@ -6,6 +6,16 @@
using the <codeEntityReference>M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema)</codeEntityReference>
extension method.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -6,6 +6,16 @@
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>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -6,6 +6,16 @@
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>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
+10
View File
@@ -5,6 +5,16 @@
<para>This sample parses a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
from JSON</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -5,6 +5,16 @@
<para>This sample validates JSON while deserializing an object using
<codeEntityReference>T:Newtonsoft.Json.JsonValidatingReader</codeEntityReference>.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -5,6 +5,16 @@
<para>This sample loads a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
from a file.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -5,6 +5,16 @@
<para>This sample uses a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchemaResolver</codeEntityReference>
to resolve schema references from different JSON documents.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
@@ -5,6 +5,16 @@
<para>This sample saves a <codeEntityReference>T:Newtonsoft.Json.Schema.JsonSchema</codeEntityReference>
to a file.</para>
</introduction>
<alert class="caution">
<para>
JSON Schema validation has been moved to its own package. See <externalLink>
<linkText>http://www.newtonsoft.com</linkText>
<linkUri>http://www.newtonsoft.com</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>
for more details.
</para>
</alert>
<section>
<title>Sample</title>
<content>
+3 -3
View File
@@ -29,7 +29,7 @@
<Topic id="ConvertingJSONandXML" visible="True" title="Converting between JSON and XML" />
<Topic id="JsonNetVsDotNetSerializers" visible="True" title="Json.NET vs .NET Serializers" />
<Topic id="JsonNetVsWindowsDataJson" visible="True" title="Json.NET vs Windows.Data.Json" />
<Topic id="Samples" visible="True" isExpanded="true" title="Samples">
<Topic id="Samples" visible="True" isExpanded="true" isSelected="true" title="Samples">
<Topic id="d6e185d5-c992-44fc-8d8f-d9acc2bbec2f" visible="True" noFile="true" title="Serializing JSON">
<Topic id="SerializeObject" visible="True" title="Serialize an Object" />
<Topic id="SerializeCollection" visible="True" title="Serialize a Collection" />
@@ -138,10 +138,10 @@
<Topic id="DeserializeFromBson" visible="True" title="Deserialize from BSON" />
<Topic id="DeserializeFromBsonCollection" visible="True" title="Deserialize a Collection from BSON" />
</Topic>
<Topic id="ca145ed0-f377-4f1c-9479-d1629082fc6e" visible="True" noFile="true" isExpanded="true" title="Reading and Writing JSON">
<Topic id="ca145ed0-f377-4f1c-9479-d1629082fc6e" visible="True" noFile="true" title="Reading and Writing JSON">
<Topic id="ReadJsonWithJsonTextReader" visible="True" title="Read JSON with JsonTextReader" />
<Topic id="WriteJsonWithJsonTextWriter" visible="True" title="Write JSON with JsonTextWriter" />
<Topic id="CustomJsonReader" visible="True" isSelected="true" title="Custom JsonReader" />
<Topic id="CustomJsonReader" visible="True" title="Custom JsonReader" />
<Topic id="CustomJsonWriter" visible="True" title="Custom JsonWriter" />
</Topic>
</Topic>
+7 -7
View File
@@ -20,7 +20,7 @@
<ProjectSummary>
</ProjectSummary>
<MissingTags>Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose</MissingTags>
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems>
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected, ProtectedInternalAsProtected</VisibleItems>
<HtmlHelp1xCompilerPath>
</HtmlHelp1xCompilerPath>
<HtmlHelp2xCompilerPath>
@@ -57,12 +57,12 @@
<ComponentConfigurations>
<ComponentConfig id="Code Block Component" enabled="True">
<component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<basePath value="{@HtmlEncProjectFolder}" />
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
<allowMissingSource value="false" />
<removeRegionMarkers value="false" />
<colorizer syntaxFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.xml" styleFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.xsl" stylesheet="{@SHFBFolder}PresentationStyles\Colorizer\highlight.css" scriptFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.js" disabled="{@DisableCodeBlockComponent}" language="cs" tabSize="0" numberLines="true" outlining="false" keepSeeTags="false" defaultTitle="true" />
</component>
<basePath value="{@HtmlEncProjectFolder}" />
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
<allowMissingSource value="false" />
<removeRegionMarkers value="false" />
<colorizer syntaxFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.xml" styleFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.xsl" stylesheet="{@SHFBFolder}PresentationStyles\Colorizer\highlight.css" scriptFile="{@SHFBFolder}PresentationStyles\Colorizer\highlight.js" disabled="{@DisableCodeBlockComponent}" language="cs" tabSize="0" numberLines="true" outlining="false" keepSeeTags="false" defaultTitle="true" />
</component>
</ComponentConfig>
</ComponentConfigurations>
<IndentHtml>False</IndentHtml>
@@ -57,4 +57,4 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.1.18023")]
[assembly: AssemblyFileVersion("7.0.1.18029")]
-25
View File
@@ -108,31 +108,6 @@ namespace Newtonsoft.Json.Tests
public DateTime Date { get; set; }
}
[Test]
public void GenerateSchema()
{
JsonSchemaGenerator generator = new JsonSchemaGenerator();
JsonSchema schema = generator.Generate(typeof(Session));
// {
// "type": "object",
// "properties": {
// "Name": {
// "required": true,
// "type": [
// "string",
// "null"
// ]
// },
// "Date": {
// "required": true,
// "type": "string"
// }
// }
// }
}
public class HtmlColorConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -56,4 +82,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -36,4 +62,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -46,4 +72,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -45,4 +71,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -38,4 +64,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Schema;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
using System.IO;
@@ -58,4 +84,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Schema;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
using System.IO;
@@ -24,4 +50,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Linq;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
@@ -54,4 +80,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using Newtonsoft.Json.Schema;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Schema;
using System;
using System.Collections.Generic;
using System.IO;
@@ -29,4 +55,5 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
#endregion
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,29 @@
using System;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -1,4 +1,29 @@
using System;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -1,4 +1,29 @@
using System;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -87,6 +87,7 @@ namespace Newtonsoft.Json.Tests
Assert.AreEqual("Inner!", exception.InnerException.Message);
}
#pragma warning disable 618
[Test]
public void JsonSchemaException()
{
@@ -101,5 +102,6 @@ namespace Newtonsoft.Json.Tests
Assert.AreEqual("Message!", exception.Message);
Assert.AreEqual("Inner!", exception.InnerException.Message);
}
#pragma warning restore 618
}
}
@@ -27,6 +27,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Newtonsoft.Json.Schema;
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
using System.Numerics;
#endif
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections.Generic;
using System.IO;
@@ -1751,4 +1752,5 @@ namespace Newtonsoft.Json.Tests
Assert.AreEqual(null, validationEventArgs);
}
}
}
}
#pragma warning restore 618
@@ -83,7 +83,6 @@
<Compile Include="Documentation\ConditionalPropertiesTests.cs" />
<Compile Include="Documentation\ConvertingJsonAndXmlTests.cs" />
<Compile Include="Documentation\JsonNetVsWindowsDataJsonTests.cs" />
<Compile Include="Documentation\JsonSchemaTests.cs" />
<Compile Include="Documentation\LinqToJsonTests.cs" />
<Compile Include="Documentation\PerformanceTests.cs" />
<Compile Include="Documentation\ReadingAndWritingJsonTests.cs" />
@@ -76,4 +76,4 @@ using System.Security;
// by using the '*' as shown below:
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.1.18023")]
[assembly: AssemblyFileVersion("7.0.1.18029")]
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections.Generic;
#if NETFX_CORE
@@ -458,4 +459,5 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.AreEqual(0, errorMessages.Count);
}
}
}
}
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
@@ -643,4 +644,5 @@ namespace Newtonsoft.Json.Tests.Schema
}, "Could not resolve schema reference '#/array/one'.");
}
}
}
}
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections;
using System.Collections.Generic;
@@ -775,35 +776,6 @@ namespace Newtonsoft.Json.Tests.Schema
{
public SortTypeFlagAsString y;
}
#if !ASPNETCORE50
[Test]
[Ignore]
public void GenerateSchemaWithStringEnum()
{
JsonSchemaGenerator jsonSchemaGenerator = new JsonSchemaGenerator();
JsonSchema schema = jsonSchemaGenerator.Generate(typeof(Y));
string json = schema.ToString();
// NOTE: This fails because the enum is serialized as an integer and not a string.
// NOTE: There should exist a way to serialize the enum as lowercase strings.
Assert.AreEqual(@"{
""type"": ""object"",
""properties"": {
""y"": {
""required"": true,
""type"": ""string"",
""enum"": [
""no"",
""asc"",
""desc""
]
}
}
}", json);
}
#endif
}
public class NullableInt32TestClass
@@ -874,4 +846,5 @@ namespace Newtonsoft.Json.Tests.Schema
public class BulkInsertTask_DSL
{
}
}
}
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Schema;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
@@ -169,4 +170,5 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.AreEqual(true, model.Properties["age"].Required);
}
}
}
}
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using Newtonsoft.Json.Schema;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
@@ -121,4 +122,5 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.AreEqual(node, node.Items[0]);
}
}
}
}
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
#if !(ASPNETCORE50 || NETFX_CORE)
using System;
using System.Collections.Generic;
@@ -119,4 +120,5 @@ namespace Newtonsoft.Json.Tests.Schema
}
}
}
#endif
#endif
#pragma warning restore 618
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections.Generic;
using System.IO;
@@ -584,4 +585,5 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.IsTrue(json.IsValid(schema));
}
}
}
}
#pragma warning restore 618
@@ -1,4 +1,30 @@
using System;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -149,3 +175,4 @@ namespace Newtonsoft.Json.Tests.Schema
}
}
}
#pragma warning restore 618
+6
View File
@@ -64,9 +64,15 @@ namespace Newtonsoft.Json
public abstract bool CanConvert(Type objectType);
/// <summary>
/// <para>
/// Gets the <see cref="JsonSchema"/> of the JSON produced by the JsonConverter.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
/// <returns>The <see cref="JsonSchema"/> of the JSON produced by the JsonConverter.</returns>
[Obsolete("JSON Schema validation has been moved to its own package. It is strongly recommended that you do not override GetSchema() in your own converter. It is not used by Json.NET and will be removed at some point in the future. Converter's that override GetSchema() will stop working when it is removed.")]
public virtual JsonSchema GetSchema()
{
return null;
+6 -1
View File
@@ -38,14 +38,19 @@ using System.IO;
using Newtonsoft.Json.Utilities.LinqBridge;
#else
using System.Linq;
#endif
namespace Newtonsoft.Json
{
/// <summary>
/// <para>
/// Represents a reader that provides <see cref="JsonSchema"/> validation.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class JsonValidatingReader : JsonReader, IJsonLineInfo
{
private class SchemaScope
@@ -92,5 +92,5 @@ using System.Security;
// by using the '*' as shown below:
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.1.18023")]
[assembly: AssemblyFileVersion("7.0.1.18029")]
[assembly: CLSCompliant(true)]
+31
View File
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Utilities;
@@ -30,18 +31,30 @@ using Newtonsoft.Json.Utilities;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Contains the JSON schema extension methods.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public static class Extensions
{
/// <summary>
/// <para>
/// Determines whether the <see cref="JToken"/> is valid.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
/// <param name="source">The source <see cref="JToken"/> to test.</param>
/// <param name="schema">The schema to test with.</param>
/// <returns>
/// <c>true</c> if the specified <see cref="JToken"/> is valid; otherwise, <c>false</c>.
/// </returns>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public static bool IsValid(this JToken source, JsonSchema schema)
{
bool valid = true;
@@ -50,7 +63,12 @@ namespace Newtonsoft.Json.Schema
}
/// <summary>
/// <para>
/// Determines whether the <see cref="JToken"/> is valid.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
/// <param name="source">The source <see cref="JToken"/> to test.</param>
/// <param name="schema">The schema to test with.</param>
@@ -58,6 +76,7 @@ namespace Newtonsoft.Json.Schema
/// <returns>
/// <c>true</c> if the specified <see cref="JToken"/> is valid; otherwise, <c>false</c>.
/// </returns>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public static bool IsValid(this JToken source, JsonSchema schema, out IList<string> errorMessages)
{
IList<string> errors = new List<string>();
@@ -69,21 +88,33 @@ namespace Newtonsoft.Json.Schema
}
/// <summary>
/// <para>
/// Validates the specified <see cref="JToken"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
/// <param name="source">The source <see cref="JToken"/> to test.</param>
/// <param name="schema">The schema to test with.</param>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public static void Validate(this JToken source, JsonSchema schema)
{
source.Validate(schema, null);
}
/// <summary>
/// <para>
/// Validates the specified <see cref="JToken"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
/// <param name="source">The source <see cref="JToken"/> to test.</param>
/// <param name="schema">The schema to test with.</param>
/// <param name="validationEventHandler">The validation event handler.</param>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public static void Validate(this JToken source, JsonSchema schema, ValidationEventHandler validationEventHandler)
{
ValidationUtils.ArgumentNotNull(source, "source");
+6
View File
@@ -33,8 +33,14 @@ using System.Globalization;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// An in-memory representation of a JSON Schema.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class JsonSchema
{
/// <summary>
@@ -37,6 +37,7 @@ using Newtonsoft.Json.Linq;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaBuilder
{
private readonly IList<JsonSchema> _stack;
@@ -23,10 +23,12 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal static class JsonSchemaConstants
{
public const string TypePropertyName = "type";
@@ -29,11 +29,17 @@ using System.Runtime.Serialization;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Returns detailed information about the schema exception.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
[Serializable]
#endif
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class JsonSchemaException : JsonException
{
/// <summary>
@@ -40,8 +40,14 @@ using System.Linq;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Generates a <see cref="JsonSchema"/> from a specified <see cref="Type"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class JsonSchemaGenerator
{
/// <summary>
@@ -23,12 +23,14 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Utilities;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaModel
{
public bool Required { get; set; }
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
#if NET20
using Newtonsoft.Json.Utilities.LinqBridge;
@@ -33,6 +34,7 @@ using System.Linq;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaModelBuilder
{
private JsonSchemaNodeCollection _nodes = new JsonSchemaNodeCollection();
@@ -35,6 +35,7 @@ using System.Linq;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaNode
{
public string Id { get; private set; }
@@ -23,10 +23,12 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.ObjectModel;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaNodeCollection : KeyedCollection<string, JsonSchemaNode>
{
protected override string GetKeyForItem(JsonSchemaNode item)
@@ -35,8 +35,14 @@ using System.Linq;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Resolves <see cref="JsonSchema"/> from an id.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class JsonSchemaResolver
{
/// <summary>
@@ -28,9 +28,15 @@ using System;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// The value types allowed by the <see cref="JsonSchema"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Flags]
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public enum JsonSchemaType
{
/// <summary>
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
@@ -36,6 +37,7 @@ using System.Linq;
namespace Newtonsoft.Json.Schema
{
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
internal class JsonSchemaWriter
{
private readonly JsonWriter _writer;
@@ -23,11 +23,19 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Specifies undefined schema Id handling options for the <see cref="JsonSchemaGenerator"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public enum UndefinedSchemaIdHandling
{
/// <summary>
@@ -29,8 +29,14 @@ using Newtonsoft.Json.Utilities;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Returns detailed information related to the <see cref="ValidationEventHandler"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public class ValidationEventArgs : EventArgs
{
private readonly JsonSchemaException _ex;
@@ -23,10 +23,18 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace Newtonsoft.Json.Schema
{
/// <summary>
/// <para>
/// Represents the callback method that will handle JSON schema validation events and the <see cref="ValidationEventArgs"/>.
/// </para>
/// <note type="caution">
/// JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com">http://www.newtonsoft.com</see> for more details.
/// </note>
/// </summary>
[Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")]
public delegate void ValidationEventHandler(object sender, ValidationEventArgs e);
}
@@ -40,6 +40,7 @@ namespace Newtonsoft.Json.Serialization
/// <summary>
/// Initializes a new instance of the <see cref="ReflectionAttributeProvider"/> class.
/// </summary>
/// <param name="attributeProvider">The instance to get attributes for. This parameter should be a <see cref="Type"/>, <see cref="MemberInfo"/>, <see cref="ParameterInfo"/> or <see cref="Assembly"/>.</param>
public ReflectionAttributeProvider(object attributeProvider)
{
ValidationUtils.ArgumentNotNull(attributeProvider, "attributeProvider");