Thoth.Json 10.4.1

dotnet add package Thoth.Json --version 10.4.1                
NuGet\Install-Package Thoth.Json -Version 10.4.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Thoth.Json" Version="10.4.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Thoth.Json --version 10.4.1                
#r "nuget: Thoth.Json, 10.4.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Thoth.Json as a Cake Addin
#addin nuget:?package=Thoth.Json&version=10.4.1

// Install Thoth.Json as a Cake Tool
#tool nuget:?package=Thoth.Json&version=10.4.1                

Thoth.Json Build Status

Stable Prerelease
NuGet Badge NuGet Badge

Benchmark

Remark

We are comparing the performance of Thoth.Json with standard JSON libraries like Newtonsoft.Json and System.Text.Json.

Thoth.Json is expected to be slower than these libraries because it uses them internally.

It is also important to note that Thoth.Json solve a different problem than these libraries. It aims to provide a cross-platform API for .NET, JavaScript, Python, etc. with a focus on the developer experience and type safety.

For most of the use cases, Thoth.Json should be fast enough, not everyone needs to parse JSON at the speed of light.

BenchmarkDotNet v0.14.0, macOS Sequoia 15.0.1 (24A348) [Darwin 24.0.0]
Apple M1 Max, 1 CPU, 10 logical and 10 physical cores
.NET SDK 8.0.401
  [Host]     : .NET 8.0.8 (8.0.824.36612), Arm64 RyuJIT AdvSIMD DEBUG
  DefaultJob : .NET 8.0.8 (8.0.824.36612), Arm64 RyuJIT AdvSIMD


| Method                      | Mean       | Error    | StdDev   | Ratio | RatioSD |
|---------------------------- |-----------:|---------:|---------:|------:|--------:|
| System.Text.Json            |   499.1 ns |  1.03 ns |  0.96 ns |  1.00 |    0.00 |
| Newtonsoft                  | 1,553.4 ns |  4.08 ns |  3.81 ns |  3.11 |    0.01 |
| Thoth.Json.System.Text.Json | 4,330.8 ns | 20.67 ns | 19.33 ns |  8.68 |    0.04 |
| Thoth.Json.Newtonsoft       | 5,783.3 ns | 57.05 ns | 50.57 ns | 11.59 |    0.10 |

Blogs post

This is to keep track of different blog post that I refer to sometimes when thinking or helping people.

Project structure

Tests

For the tests, we use a shared project Thoth.Json.Tests that is referenced by the different runners. This is because we want each runner to only have the minimum amount of dependencies, and also if we include files from outside the .fsproj folder, then some generated files by Fable escape from the specify outDir.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (28)

Showing the top 5 NuGet packages that depend on Thoth.Json:

Package Downloads
Fable.Elmish.Debugger

Debugger for Elmish apps

Fable.PowerPack

Package Description

Thoth.Fetch

Library for working with Fable.Fetch and Thoth.Json when doing web request

Plough.WebApi.Core

Library to design web api with shared api server/client definition project. Plough.WebApi.Core has compatibility with F# Fable.

Thoth.Json.CE

Computation Expression for building Thoth.Json decoders

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
10.4.1 47 1/20/2025
10.4.0 1,688 11/23/2024
10.2.0 64,083 5/22/2023
10.1.0 11,509 3/23/2023
10.0.0 30,077 2/8/2023
9.1.0 1,477 1/22/2023
9.0.0 15,924 12/4/2022
8.0.0 2,133 11/9/2022
7.0.0 85,412 1/5/2022
6.0.0 98,450 7/6/2021
5.1.0 74,807 1/13/2021
5.0.0 16,225 10/13/2020
4.1.0 109,044 5/7/2020
4.0.0 24,205 3/4/2020
3.5.0 11,906 1/13/2020
3.4.1 27,063 10/25/2019
3.4.0 613 10/25/2019
3.3.0 16,497 6/24/2019
3.2.0 4,235 6/5/2019
3.1.0 19,769 5/4/2019
3.0.0 45,092 4/17/2019
3.0.0-beta-005 702 4/2/2019
3.0.0-beta-004 491 4/2/2019
3.0.0-beta-003 1,096 3/17/2019
3.0.0-beta-002 729 1/11/2019
3.0.0-beta-001 578 1/10/2019
2.5.0 26,252 11/8/2018
2.4.0 1,635 11/7/2018
2.3.0 3,168 10/18/2018
2.2.0 2,141 10/11/2018
2.1.0 1,126 10/3/2018
2.0.0 19,787 10/1/2018
2.0.0-beta-005 966 8/31/2018
2.0.0-beta-004 4,989 8/3/2018
2.0.0-beta-003 1,161 7/16/2018
2.0.0-beta-002 892 7/12/2018
2.0.0-beta-001 1,062 7/11/2018
1.1.0 3,321 6/7/2018
1.0.0 4,729 4/17/2018

### 🐞 Bug Fixes

* Don't include `Fable.Package.SDK` in the published dependencies ([8166b758](https://github.com/thoth-org/Thoth.Json/commit/8166b758b1579eb722725187dc40308839615cf3))

<strong><small>[View changes on Github](https://github.com/thoth-org/Thoth.Json/compare/21d1185b4b1edb58debeed8fe5214a0878e47cb6..8166b758b1579eb722725187dc40308839615cf3)</small></strong>