Fable.TypedJson 5.5.0

dotnet add package Fable.TypedJson --version 5.5.0
                    
NuGet\Install-Package Fable.TypedJson -Version 5.5.0
                    
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="Fable.TypedJson" Version="5.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fable.TypedJson" Version="5.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Fable.TypedJson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fable.TypedJson --version 5.5.0
                    
#r "nuget: Fable.TypedJson, 5.5.0"
                    
#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.
#:package Fable.TypedJson@5.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fable.TypedJson&version=5.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Fable.TypedJson&version=5.5.0
                    
Install as a Cake Tool

Fable.TypedJson

Build and Test NuGet

Type-driven JSON validation and serialization for F# on BEAM, Python, JavaScript, and .NET, with Pydantic-style validation through refined types.

Derive a decoder and encoder from your F# model, then generate JSON Schema using the same planning logic. Add constraints through custom codecs, choose field naming conventions, and report validation errors with paths.

Install

Install the core package and the adapter for your target:

dotnet add package Fable.TypedJson
dotnet add package Fable.TypedJson.Beam
Target Adapter package JSON implementation
BEAM (Erlang) Fable.TypedJson.Beam jsx
Python Fable.TypedJson.Python json
JavaScript Fable.TypedJson.JS JSON.parse / JSON.stringify
.NET Fable.TypedJson.DotNet System.Text.Json

The core and Fable adapters target netstandard2.0; the .NET adapter targets net10.0. See Getting started for imports and a complete round trip.

Quick start

open Fable.TypedJson.Json
open Fable.TypedJson.Beam.Json // or .Python.Json / .JS.Json / .DotNet.Json

type Reading = { Location: string; AirTemperature: float }

let codec = auto<Reading> ()

let decoded =
    decodeText codec """{"location":"Oslo","airTemperature":22.5}"""
// Ok { Location = "Oslo"; AirTemperature = 22.5 }

let encoded = codec.encode { Location = "Oslo"; AirTemperature = 22.5 }
// JSON text: {"location":"Oslo","airTemperature":22.5}

auto accepts primitive coercion, such as "22.5" for a float field. Use autoStrict when JSON primitive types must match the model. decodeText distinguishes malformed JSON from typed validation errors.

Build and configure a codec once, then reuse it. On BEAM, retain it in an application or actor owner; a compiled module-level accessor can rebuild its value on each call.

Documentation

Start with the Overview, then follow the concepts you need:

Guide What you will learn
Getting started Install an adapter and decode, encode, and describe a model
Decoding JSON text, parsed values, string maps, strictness, and errors
Validation Refined types, custom codecs, registries, and model validators
Wire format Naming, aliases, options, collections, scalars, and tagged unions
JSON Schema Constraints, recursive definitions, and OpenAPI integration
Architecture Codec planning, backend interfaces, and optimization boundaries
Performance Codec ownership and how to interpret benchmarks
Choosing a JSON library How this approach relates to Thoth.Json and Fable.SimpleJson

For repository setup and changes, read Contributing.

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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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 (7)

Showing the top 5 NuGet packages that depend on Fable.TypedJson:

Package Downloads
Fable.TypedJson.JS

JavaScript backend shim for Fable.TypedJson. Wires `JSON.parse` / `JSON.stringify` and JavaScript's native object/array/number/string/boolean/null types into the IJsonBackend abstraction.

Fable.TypedJson.Python

Python backend shim for Fable.TypedJson. Wires Python's `json` stdlib into the IJsonBackend abstraction; wraps native ints / floats as Fable's int32 / float64 at the read boundary so erased JsonValue patterns dispatch correctly.

Fable.TypedJson.Beam

BEAM (Erlang) backend shim for Fable.TypedJson. Wires `Fable.Beam.Maps` and `Fable.Beam.Jsx.Jsx` into the IJsonBackend abstraction.

Fable.TypedJson.DotNet

.NET backend shim for Fable.TypedJson. Wires System.Text.Json into the IJsonBackend abstraction so the same codecs run natively on the CLR (alongside the Fable BEAM/JS/Python targets).

Fable.Giraffe.Js

Giraffe for Fable JavaScript (Node)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.5.0 0 10/3/2026
5.4.0 269 9/5/2026
5.3.0 254 8/23/2026
5.1.0 493 8/4/2026
5.0.1 228 8/4/2026
5.0.0 267 8/4/2026
5.0.0-rc.1 101 8/2/2026
0.4.1 118 8/1/2026
0.4.0 242 5/21/2026
0.3.0 227 5/3/2026
0.2.0 152 5/3/2026
0.2.0-rc.1 84 5/1/2026