Skip to content

Commit b0c779a

Browse files
committed
Lower version of System.Text.Json for .NET Standard 2.0 to 4.7.2
1 parent 7320758 commit b0c779a

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/FluentHttpClient/FluentHttpClient.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@
3535
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
3636
</PropertyGroup>
3737

38-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1'">
39-
<PackageReference Include="System.Text.Json" Version="6.0.10" PrivateAssets="All" />
38+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
39+
<PackageReference Include="System.Text.Json" Version="[4.6.0,)" PrivateAssets="All" />
40+
<PackageReference Include="System.Text.Encodings.Web" Version="[4.7.2,)" PrivateAssets="All" />
41+
</ItemGroup>
42+
43+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
44+
<PackageReference Include="System.Text.Json" Version="[6.0.10,)" PrivateAssets="All" />
4045
</ItemGroup>
4146

4247
<ItemGroup>

src/FluentHttpClient/FluentJsonSerializer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ internal static class FluentJsonSerializer
1515
public static readonly JsonSerializerOptions DefaultJsonSerializerOptions = new JsonSerializerOptions
1616
{
1717
PropertyNameCaseInsensitive = true,
18+
#if NETSTANDARD2_1_OR_GREATER
1819
NumberHandling = JsonNumberHandling.AllowReadingFromString,
1920
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
21+
#endif
2022
};
2123
}

src/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "5.0.0",
3+
"version": "5.0",
44
"publicReleaseRefSpec": [
55
"^refs/heads/main$",
66
"^refs/heads/v\\d+(?:\\.\\d+)?$"

0 commit comments

Comments
 (0)