Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Newtonsoft.Json dependency #1531

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
<ItemGroup>
<EmbeddedResource Include="Templates\*.liquid" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NJsonSchema.CodeGeneration\NJsonSchema.CodeGeneration.csproj" />
<ProjectReference Include="..\NJsonSchema\NJsonSchema.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
<EmbeddedResource Include="Templates\File.ReferenceHandling.liquid" />
<EmbeddedResource Include="Templates\File.ParseDateOnly.liquid" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NJsonSchema.CodeGeneration\NJsonSchema.CodeGeneration.csproj" />
<ProjectReference Include="..\NJsonSchema\NJsonSchema.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Fluid.Core" Version="2.2.15" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static JsonSerializerSettings CreateSettings(bool hideStackTrace = false
var settings = new JsonSerializerSettings
{
Formatting = Formatting.Indented,
ContractResolver = new CamelCasePropertyNamesContractResolver(),
ContractResolver = new DefaultContractResolver(),
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
Converters =
{
Expand Down
4 changes: 2 additions & 2 deletions src/NJsonSchema.Tests/Validation/LineInformationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public async Task When_validating_from_jtoken_parse_line_information_if_exists()
await InitAsync();

//// Act
var tokenWithInfo = JToken.Parse(Json, new JsonLoadSettings() {LineInfoHandling = LineInfoHandling.Ignore});
var tokenWithInfo = JToken.Parse(Json, new JsonLoadSettings() {LineInfoHandling = LineInfoHandling.Load});
var errorsWithInfo = Schema.Validate(tokenWithInfo);
var tokenNoInfoParse = JToken.Parse(Json, new JsonLoadSettings() {LineInfoHandling = LineInfoHandling.Load});
var tokenNoInfoParse = JToken.Parse(Json, new JsonLoadSettings() {LineInfoHandling = LineInfoHandling.Ignore});
var errorsNoInfoParse = Schema.Validate(tokenNoInfoParse);
var tokenNoInfoDeserialize = JsonConvert.DeserializeObject<JToken>(Json);
var errorsNoInfoDeserialize = Schema.Validate(tokenNoInfoDeserialize);
Expand Down
2 changes: 1 addition & 1 deletion src/NJsonSchema/NJsonSchema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Namotion.Reflection" Version="2.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" />
Expand Down