Skip to content
Draft
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Added
### Changed

- `SystemTextJson`: Upped minimum `System.Text.Json` version to `10.0.` [#129](https://github.com/jet/FsCodec/pull/129)

### Removed
### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/FsCodec.SystemTextJson/FsCodec.SystemTextJson.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="System.Text.Json" Version="6.0.10" />
<PackageReference Include="System.Text.Json" Version="10.0.0-rc.2.25502.107" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/FsCodec.SystemTextJson/Interop.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ open System
open System.Runtime.CompilerServices
open System.Text.Json

[<Extension; AbstractClass; Sealed>]
[<AbstractClass; Sealed>]
type InteropHelpers private () =

static member Utf8ToJsonElement(x: ReadOnlyMemory<byte>): JsonElement =
if x.IsEmpty then JsonElement()
else JsonSerializer.Deserialize<JsonElement>(x.Span)
else JsonElement.Parse x.Span

static member JsonElementToUtf8(x: JsonElement): ReadOnlyMemory<byte> =
if x.ValueKind = JsonValueKind.Undefined then ReadOnlyMemory.Empty
Expand Down