Skip to content

Commit

Permalink
[FSSDK-8938] chore: Updated newtonsoft.Json version and NjsonSchema v…
Browse files Browse the repository at this point in the history
…ersion (#330)
  • Loading branch information
mnoman09 authored and NomanShoaib committed Mar 16, 2023
1 parent 438f0d6 commit 1073b2d
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 53 deletions.
6 changes: 3 additions & 3 deletions OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down Expand Up @@ -124,7 +124,7 @@
<HintPath>..\packages\murmurhash-signed.1.0.2\lib\net45\MurmurHash.dll</HintPath>
</Reference>
<Reference Include="NJsonSchema">
<HintPath>..\packages\NJsonSchema.8.30.6304.31883\lib\net45\NJsonSchema.dll</HintPath>
<HintPath>..\packages\NJsonSchema.10.8.0\lib\net45\NJsonSchema.dll</HintPath>
</Reference>
<Reference Include="OptimizelySDK">
<HintPath>..\packages\Optimizely.SDK.2.1.0\lib\net45\OptimizelySDK.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK.DemoApp/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK.DemoApp/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="murmurhash-signed" version="1.0.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NJsonSchema" version="8.30.6304.31883" targetFramework="net45" />
<package id="NJsonSchema" version="10.8.0" targetFramework="net45" />
<package id="Optimizely.SDK" version="3.2.0" targetFramework="net45" />
<package id="popper.js" version="1.12.9" targetFramework="net45" />
<package id="Respond" version="1.2.0" targetFramework="net45" />
Expand Down
4 changes: 2 additions & 2 deletions OptimizelySDK.Net35/OptimizelySDK.Net35.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK.Net35/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="murmurhash-signed" version="1.0.2" targetFramework="net35" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net35" />
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net35" />
</packages>
4 changes: 2 additions & 2 deletions OptimizelySDK.Net40/OptimizelySDK.Net40.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK.Net40/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="murmurhash-signed" version="1.0.2" targetFramework="net40" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="NJsonSchema" Version="8.33.6323.36213" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="murmurhash-signed" Version="1.0.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="murmurhash-signed" Version="1.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="NJsonSchema" Version="8.30.6304.31883" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions OptimizelySDK.Package/OptimizelySDK.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@
<dependencies>
<group targetFramework=".NETFramework4.5">
<dependency id="murmurhash-signed" version="1.0.2" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="NJsonSchema" version="8.30.6304.31883" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
<dependency id="NJsonSchema" version="10.8.0" />
</group>
<group targetFramework=".NETFramework3.5">
<dependency id="murmurhash-signed" version="1.0.2" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
<group targetFramework=".NETFramework4.0">
<dependency id="murmurhash-signed" version="1.0.2" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
<group targetFramework=".NETStandard1.6">
<dependency id="NETStandard.Library" version="1.6.1" />
<dependency id="murmurhash-signed" version="1.0.2" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="NJsonSchema" version="8.33.6323.36213" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
<dependency id="NJsonSchema" version="10.8.0" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="NETStandard.Library" version="2.0.3" />
<dependency id="murmurhash-signed" version="1.0.2" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="NJsonSchema" version="8.33.6323.36213" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
<dependency id="NJsonSchema" version="10.8.0" />
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
</group>
</dependencies>
Expand Down
29 changes: 16 additions & 13 deletions OptimizelySDK.Tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@
<connectionStrings>

</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
5 changes: 2 additions & 3 deletions OptimizelySDK.Tests/OptimizelySDK.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
<HintPath>..\packages\Moq.4.7.1\lib\net45\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
Expand Down
16 changes: 10 additions & 6 deletions OptimizelySDK/OptimizelySDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,22 @@
<!-- <DefineConstants Condition=" $(DefineConstants.Contains(';NET')) ">$(DefineConstants.Remove($(DefineConstants.LastIndexOf(";NET"))));$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</DefineConstants> -->
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="Namotion.Reflection, Version=2.1.0.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\Namotion.Reflection.2.1.0\lib\net45\Namotion.Reflection.dll</HintPath>
</Reference>
<Reference Include="NJsonSchema, Version=8.30.6304.31883, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.8.30.6304.31883\lib\net45\NJsonSchema.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NJsonSchema, Version=10.8.0.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102, processorArchitecture=MSIL">
<HintPath>..\packages\NJsonSchema.10.8.0\lib\net45\NJsonSchema.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
Expand Down
8 changes: 3 additions & 5 deletions OptimizelySDK/Utils/Validator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ public static bool ValidateJSONSchema(string configJson, string schemaJson = nul
{
try
{
return !NJsonSchema.JsonSchema4
.FromJsonAsync(schemaJson ?? Schema.GetSchemaJson())
.Result
.Validate(configJson)
.Any();
return !NJsonSchema.JsonSchema.FromJsonAsync(schemaJson ?? Schema.GetSchemaJson()).
Result.Validate(configJson).
Any();
}
catch (Newtonsoft.Json.JsonReaderException)
{
Expand Down
7 changes: 4 additions & 3 deletions OptimizelySDK/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="murmurhash-signed" version="1.0.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NJsonSchema" version="8.30.6304.31883" targetFramework="net45" />
</packages>
<package id="Namotion.Reflection" version="2.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net45" />
<package id="NJsonSchema" version="10.8.0" targetFramework="net45" />
</packages>

0 comments on commit 1073b2d

Please sign in to comment.