Skip to content
Merged
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
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ FluentHttpClient is optimized for .NET 10 and the newest .NET releases, while al

Projects targeting **.NETStandard 2.0** or **.NETStandard 2.1** do not include `System.Text.Json` in the framework. FluentHttpClient uses `System.Text.Json` internally for its JSON extensions, but the package is not referenced transitively.

If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference with a minimum version of 6.0.10 (a higher version is always recommended):

```xml
<PackageReference Include="System.Text.Json" Version="6.0.10" />
```
If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference, with a minimum version of 4.6.0 or 6.0.10, respectively. A higher version is always recommended.

Apps targeting modern TFMs (such as .NET 5 and later) already include `System.Text.Json` and do not require this step.

Expand Down
6 changes: 1 addition & 5 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ FluentHttpClient is optimized for .NET 10 and the newest .NET releases, while al

Projects targeting **.NETStandard 2.0** or **.NETStandard 2.1** do not include `System.Text.Json` in the framework. FluentHttpClient uses `System.Text.Json` internally for its JSON extensions, but the package is not referenced transitively.

If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference with a minimum version of 6.0.10 (a higher version is always recommended):

```xml
<PackageReference Include="System.Text.Json" Version="6.0.10" />
```
If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference, with a minimum version of 4.6.0 or 6.0.10, respectively. A higher version is always recommended.

Apps targeting modern TFMs (such as .NET 5 and later) already include `System.Text.Json` and do not require this step.

Expand Down
9 changes: 7 additions & 2 deletions src/FluentHttpClient/FluentHttpClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="6.0.10" PrivateAssets="All" />
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="[4.6.0,)" PrivateAssets="All" />
<PackageReference Include="System.Text.Encodings.Web" Version="[4.7.2,)" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="[6.0.10,)" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/FluentHttpClient/FluentJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ internal static class FluentJsonSerializer
public static readonly JsonSerializerOptions DefaultJsonSerializerOptions = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true,
#if NETSTANDARD2_1_OR_GREATER
NumberHandling = JsonNumberHandling.AllowReadingFromString,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
#endif
};
}
6 changes: 1 addition & 5 deletions src/FluentHttpClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ FluentHttpClient is optimized for .NET 10 and the newest .NET releases, while al

Projects targeting **.NETStandard 2.0** or **.NETStandard 2.1** do not include `System.Text.Json` in the framework. FluentHttpClient uses `System.Text.Json` internally for its JSON extensions, but the package is not referenced transitively.

If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference with a minimum version of 6.0.10 (a higher version is always recommended):

```xml
<PackageReference Include="System.Text.Json" Version="6.0.10" />
```
If you are building against **netstandard2.0** or **netstandard2.1**, or any TFM that does **not** ship `System.Text.Json`, you will need to add an explicit package reference, with a minimum version of 4.6.0 or 6.0.10, respectively. A higher version is always recommended.

Apps targeting modern TFMs (such as .NET 5 and later) already include `System.Text.Json` and do not require this step.

Expand Down
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "5.0.0",
"version": "5.0.1",
"publicReleaseRefSpec": [
"^refs/heads/main$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down