diff --git a/Doc/JsonSchema.aml b/Doc/JsonSchema.aml index ec62375b..2197b118 100644 --- a/Doc/JsonSchema.aml +++ b/Doc/JsonSchema.aml @@ -16,16 +16,12 @@ - The JSON Schema standard isn't final. - - Json.NET implements - - JSON Schema Draft 3 - https://tools.ietf.org/html/draft-zyp-json-schema-03 + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com _blank - . - - 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. + + for more details. diff --git a/Doc/Samples/Schema/CreateJsonSchemaManually.aml b/Doc/Samples/Schema/CreateJsonSchemaManually.aml index 2818e755..cb599e18 100644 --- a/Doc/Samples/Schema/CreateJsonSchemaManually.aml +++ b/Doc/Samples/Schema/CreateJsonSchemaManually.aml @@ -5,6 +5,16 @@ This sample creates a new T:Newtonsoft.Json.Schema.JsonSchema instance manually in code. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/JTokenIsValid.aml b/Doc/Samples/Schema/JTokenIsValid.aml index 0a0012dd..de3bbcdc 100644 --- a/Doc/Samples/Schema/JTokenIsValid.aml +++ b/Doc/Samples/Schema/JTokenIsValid.aml @@ -6,6 +6,16 @@ using the M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema) extension method. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/JTokenIsValidWithMessages.aml b/Doc/Samples/Schema/JTokenIsValidWithMessages.aml index 8c03932a..69bbc242 100644 --- a/Doc/Samples/Schema/JTokenIsValidWithMessages.aml +++ b/Doc/Samples/Schema/JTokenIsValidWithMessages.aml @@ -6,6 +6,16 @@ using the M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema) extension method and returns error messages. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/JTokenValidateWithEvent.aml b/Doc/Samples/Schema/JTokenValidateWithEvent.aml index 9c662c68..617fba92 100644 --- a/Doc/Samples/Schema/JTokenValidateWithEvent.aml +++ b/Doc/Samples/Schema/JTokenValidateWithEvent.aml @@ -6,6 +6,16 @@ using the M:Newtonsoft.Json.Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema) extension method and raises an event for each validation error. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/JsonSchemaParse.aml b/Doc/Samples/Schema/JsonSchemaParse.aml index 40df194d..cfb99f36 100644 --- a/Doc/Samples/Schema/JsonSchemaParse.aml +++ b/Doc/Samples/Schema/JsonSchemaParse.aml @@ -5,6 +5,16 @@ This sample parses a T:Newtonsoft.Json.Schema.JsonSchema from JSON + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/JsonValidatingReaderAndSerializer.aml b/Doc/Samples/Schema/JsonValidatingReaderAndSerializer.aml index 5e501792..26b48557 100644 --- a/Doc/Samples/Schema/JsonValidatingReaderAndSerializer.aml +++ b/Doc/Samples/Schema/JsonValidatingReaderAndSerializer.aml @@ -5,6 +5,16 @@ This sample validates JSON while deserializing an object using T:Newtonsoft.Json.JsonValidatingReader. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/LoadJsonSchemaFromFile.aml b/Doc/Samples/Schema/LoadJsonSchemaFromFile.aml index de7ebce4..0d19470d 100644 --- a/Doc/Samples/Schema/LoadJsonSchemaFromFile.aml +++ b/Doc/Samples/Schema/LoadJsonSchemaFromFile.aml @@ -5,6 +5,16 @@ This sample loads a T:Newtonsoft.Json.Schema.JsonSchema from a file. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/RefJsonSchemaResolver.aml b/Doc/Samples/Schema/RefJsonSchemaResolver.aml index 68a290c6..1b15a351 100644 --- a/Doc/Samples/Schema/RefJsonSchemaResolver.aml +++ b/Doc/Samples/Schema/RefJsonSchemaResolver.aml @@ -5,6 +5,16 @@ This sample uses a T:Newtonsoft.Json.Schema.JsonSchemaResolver to resolve schema references from different JSON documents. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/Samples/Schema/SaveJsonSchemaToFile.aml b/Doc/Samples/Schema/SaveJsonSchemaToFile.aml index 553a18d4..e3b081dc 100644 --- a/Doc/Samples/Schema/SaveJsonSchemaToFile.aml +++ b/Doc/Samples/Schema/SaveJsonSchemaToFile.aml @@ -5,6 +5,16 @@ This sample saves a T:Newtonsoft.Json.Schema.JsonSchema to a file. + + + JSON Schema validation has been moved to its own package. See + http://www.newtonsoft.com + http://www.newtonsoft.com + _blank + + for more details. + +
Sample diff --git a/Doc/doc.content b/Doc/doc.content index 8b8462f9..79923451 100644 --- a/Doc/doc.content +++ b/Doc/doc.content @@ -29,7 +29,7 @@ - + @@ -138,10 +138,10 @@ - + - + diff --git a/Doc/doc.shfbproj b/Doc/doc.shfbproj index 68a8948e..6fb3b33d 100644 --- a/Doc/doc.shfbproj +++ b/Doc/doc.shfbproj @@ -20,7 +20,7 @@ Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose - InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected + InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected, ProtectedInternalAsProtected @@ -57,12 +57,12 @@ - - {@HelpFormatOutputPaths} - - - - + + {@HelpFormatOutputPaths} + + + + False diff --git a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs index cdf2801c..aba0f90f 100644 --- a/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.TestConsole/Properties/AssemblyInfo.cs @@ -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")] diff --git a/Src/Newtonsoft.Json.Tests/DemoTests.cs b/Src/Newtonsoft.Json.Tests/DemoTests.cs index a52f7041..5e0df84a 100644 --- a/Src/Newtonsoft.Json.Tests/DemoTests.cs +++ b/Src/Newtonsoft.Json.Tests/DemoTests.cs @@ -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) diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/CreateJsonSchemaManually.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/CreateJsonSchemaManually.cs index b9d865da..f68607d1 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/CreateJsonSchemaManually.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/CreateJsonSchemaManually.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValid.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValid.cs index 5844862e..2ca6e5ef 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValid.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValid.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValidWithMessages.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValidWithMessages.cs index b45eb958..03faa522 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValidWithMessages.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenIsValidWithMessages.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenValidateWithEvent.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenValidateWithEvent.cs index 8dc03834..a92f0830 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenValidateWithEvent.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JTokenValidateWithEvent.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonSchemaParse.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonSchemaParse.cs index 91047148..422a5dac 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonSchemaParse.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonSchemaParse.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonValidatingReaderAndSerializer.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonValidatingReaderAndSerializer.cs index 9d9ecf1f..4114722e 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonValidatingReaderAndSerializer.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/JsonValidatingReaderAndSerializer.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/LoadJsonSchemaFromFile.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/LoadJsonSchemaFromFile.cs index 92544217..6342f46d 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/LoadJsonSchemaFromFile.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/LoadJsonSchemaFromFile.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/RefJsonSchemaResolver.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/RefJsonSchemaResolver.cs index 8915c75b..b5b6b992 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/RefJsonSchemaResolver.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/RefJsonSchemaResolver.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/SaveJsonSchemaToFile.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/SaveJsonSchemaToFile.cs index de76fc0d..cec3208f 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/SaveJsonSchemaToFile.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Schema/SaveJsonSchemaToFile.cs @@ -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 } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertJsonToXml.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertJsonToXml.cs index 918bf7d5..229d8d54 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertJsonToXml.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertJsonToXml.cs @@ -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; diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJson.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJson.cs index 54b45459..d5d9c32a 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJson.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJson.cs @@ -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; diff --git a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJsonForceArray.cs b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJsonForceArray.cs index 29a5f6f6..2d60ae3a 100644 --- a/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJsonForceArray.cs +++ b/Src/Newtonsoft.Json.Tests/Documentation/Samples/Xml/ConvertXmlToJsonForceArray.cs @@ -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; diff --git a/Src/Newtonsoft.Json.Tests/ExceptionTests.cs b/Src/Newtonsoft.Json.Tests/ExceptionTests.cs index a43c177e..cf53d054 100644 --- a/Src/Newtonsoft.Json.Tests/ExceptionTests.cs +++ b/Src/Newtonsoft.Json.Tests/ExceptionTests.cs @@ -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 } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs b/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs index 1ffb56d1..00df57df 100644 --- a/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs +++ b/Src/Newtonsoft.Json.Tests/JsonConvertTest.cs @@ -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 diff --git a/Src/Newtonsoft.Json.Tests/JsonValidatingReaderTests.cs b/Src/Newtonsoft.Json.Tests/JsonValidatingReaderTests.cs index 9a56ee13..f169547f 100644 --- a/Src/Newtonsoft.Json.Tests/JsonValidatingReaderTests.cs +++ b/Src/Newtonsoft.Json.Tests/JsonValidatingReaderTests.cs @@ -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); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.csproj index fe518cc8..81a4de5f 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.csproj @@ -83,7 +83,6 @@ - diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index ad393cfe..97582489 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.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")] diff --git a/Src/Newtonsoft.Json.Tests/Schema/ExtensionsTests.cs b/Src/Newtonsoft.Json.Tests/Schema/ExtensionsTests.cs index f7a839e6..54f7995b 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/ExtensionsTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/ExtensionsTests.cs @@ -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); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaBuilderTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaBuilderTests.cs index c2c72f78..22c8422d 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaBuilderTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaBuilderTests.cs @@ -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'."); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaGeneratorTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaGeneratorTests.cs index 15200dfc..ee6a4db1 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaGeneratorTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaGeneratorTests.cs @@ -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 { } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaModelBuilderTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaModelBuilderTests.cs index aaddddae..ad98ae8b 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaModelBuilderTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaModelBuilderTests.cs @@ -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); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaNodeTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaNodeTests.cs index 0fb6baf8..09b112c1 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaNodeTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaNodeTests.cs @@ -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]); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaSpecTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaSpecTests.cs index 2deb500d..2711afc7 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaSpecTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaSpecTests.cs @@ -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 \ No newline at end of file +#endif +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaTests.cs b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaTests.cs index 9bea22ce..c91c0b95 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/JsonSchemaTests.cs @@ -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)); } } -} \ No newline at end of file +} +#pragma warning restore 618 \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs b/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs index 2b6c3ac2..b783fe4b 100644 --- a/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs +++ b/Src/Newtonsoft.Json.Tests/Schema/PerformanceTests.cs @@ -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 \ No newline at end of file diff --git a/Src/Newtonsoft.Json/JsonConverter.cs b/Src/Newtonsoft.Json/JsonConverter.cs index 424b7eeb..30d48625 100644 --- a/Src/Newtonsoft.Json/JsonConverter.cs +++ b/Src/Newtonsoft.Json/JsonConverter.cs @@ -64,9 +64,15 @@ namespace Newtonsoft.Json public abstract bool CanConvert(Type objectType); /// + /// /// Gets the of the JSON produced by the JsonConverter. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// /// The of the JSON produced by the JsonConverter. + [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; diff --git a/Src/Newtonsoft.Json/JsonValidatingReader.cs b/Src/Newtonsoft.Json/JsonValidatingReader.cs index 41a8b062..b30f6b57 100644 --- a/Src/Newtonsoft.Json/JsonValidatingReader.cs +++ b/Src/Newtonsoft.Json/JsonValidatingReader.cs @@ -38,14 +38,19 @@ using System.IO; using Newtonsoft.Json.Utilities.LinqBridge; #else using System.Linq; - #endif namespace Newtonsoft.Json { /// + /// /// Represents a reader that provides validation. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [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 diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index f4964748..0551b164 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -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)] diff --git a/Src/Newtonsoft.Json/Schema/Extensions.cs b/Src/Newtonsoft.Json/Schema/Extensions.cs index 2532dff8..bf00e449 100644 --- a/Src/Newtonsoft.Json/Schema/Extensions.cs +++ b/Src/Newtonsoft.Json/Schema/Extensions.cs @@ -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 { /// + /// /// Contains the JSON schema extension methods. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public static class Extensions { /// + /// /// Determines whether the is valid. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// /// The source to test. /// The schema to test with. /// /// true if the specified is valid; otherwise, false. /// + [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 } /// + /// /// Determines whether the is valid. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// /// The source to test. /// The schema to test with. @@ -58,6 +76,7 @@ namespace Newtonsoft.Json.Schema /// /// true if the specified is valid; otherwise, false. /// + [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 errorMessages) { IList errors = new List(); @@ -69,21 +88,33 @@ namespace Newtonsoft.Json.Schema } /// + /// /// Validates the specified . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// /// The source to test. /// The schema to test with. + [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); } /// + /// /// Validates the specified . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// /// The source to test. /// The schema to test with. /// The validation event handler. + [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"); diff --git a/Src/Newtonsoft.Json/Schema/JsonSchema.cs b/Src/Newtonsoft.Json/Schema/JsonSchema.cs index 25ad8c6d..15f51718 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchema.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchema.cs @@ -33,8 +33,14 @@ using System.Globalization; namespace Newtonsoft.Json.Schema { /// + /// /// An in-memory representation of a JSON Schema. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public class JsonSchema { /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs index 72973e7f..f4182ae9 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs @@ -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 _stack; diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs index 26b824dd..5ee46465 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs @@ -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"; diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs index 5cc0f4f6..ba7ed485 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs @@ -29,11 +29,17 @@ using System.Runtime.Serialization; namespace Newtonsoft.Json.Schema { /// + /// /// Returns detailed information about the schema exception. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// #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 { /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs index fef3fca2..62e13b4e 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs @@ -40,8 +40,14 @@ using System.Linq; namespace Newtonsoft.Json.Schema { /// + /// /// Generates a from a specified . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public class JsonSchemaGenerator { /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs index 5a369fcc..fbc54798 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs @@ -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; } diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs index 4f17e3aa..c6827367 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs @@ -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(); diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs index 3cd2c333..16087bb3 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs @@ -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; } diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs index 008919a8..bca9ca17 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs @@ -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 { protected override string GetKeyForItem(JsonSchemaNode item) diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs index d38121d6..5481ffa4 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs @@ -35,8 +35,14 @@ using System.Linq; namespace Newtonsoft.Json.Schema { /// + /// /// Resolves from an id. + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public class JsonSchemaResolver { /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs index 5b32805d..24f3c438 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs @@ -28,9 +28,15 @@ using System; namespace Newtonsoft.Json.Schema { /// + /// /// The value types allowed by the . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// [Flags] + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public enum JsonSchemaType { /// diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs index e5a817ba..8bc3b257 100644 --- a/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs +++ b/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs @@ -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; diff --git a/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs b/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs index 43c76536..e69f40a8 100644 --- a/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs +++ b/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs @@ -23,11 +23,19 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion +using System; + namespace Newtonsoft.Json.Schema { /// + /// /// Specifies undefined schema Id handling options for the . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [Obsolete("JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details.")] public enum UndefinedSchemaIdHandling { /// diff --git a/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs b/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs index 86173a9a..e185ed4a 100644 --- a/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs +++ b/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs @@ -29,8 +29,14 @@ using Newtonsoft.Json.Utilities; namespace Newtonsoft.Json.Schema { /// + /// /// Returns detailed information related to the . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [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; diff --git a/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs b/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs index 80294f13..8e3aa0a0 100644 --- a/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs +++ b/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs @@ -23,10 +23,18 @@ // OTHER DEALINGS IN THE SOFTWARE. #endregion +using System; + namespace Newtonsoft.Json.Schema { /// + /// /// Represents the callback method that will handle JSON schema validation events and the . + /// + /// + /// JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com for more details. + /// /// + [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); } \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Serialization/ReflectionAttributeProvider.cs b/Src/Newtonsoft.Json/Serialization/ReflectionAttributeProvider.cs index c70c32fd..fe2ee796 100644 --- a/Src/Newtonsoft.Json/Serialization/ReflectionAttributeProvider.cs +++ b/Src/Newtonsoft.Json/Serialization/ReflectionAttributeProvider.cs @@ -40,6 +40,7 @@ namespace Newtonsoft.Json.Serialization /// /// Initializes a new instance of the class. /// + /// The instance to get attributes for. This parameter should be a , , or . public ReflectionAttributeProvider(object attributeProvider) { ValidationUtils.ArgumentNotNull(attributeProvider, "attributeProvider");