Fable.TypedJson.Python
5.5.0
dotnet add package Fable.TypedJson.Python --version 5.5.0
NuGet\Install-Package Fable.TypedJson.Python -Version 5.5.0
<PackageReference Include="Fable.TypedJson.Python" Version="5.5.0" />
<PackageVersion Include="Fable.TypedJson.Python" Version="5.5.0" />
<PackageReference Include="Fable.TypedJson.Python" />
paket add Fable.TypedJson.Python --version 5.5.0
#r "nuget: Fable.TypedJson.Python, 5.5.0"
#:package Fable.TypedJson.Python@5.5.0
#addin nuget:?package=Fable.TypedJson.Python&version=5.5.0
#tool nuget:?package=Fable.TypedJson.Python&version=5.5.0
Fable.TypedJson
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 | Versions 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. |
-
.NETStandard 2.0
- Fable.Core (>= 5.0.0)
- Fable.Python (= 5.5.0)
- Fable.TypedJson (>= 5.5.0)
- FSharp.Core (>= 6.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fable.TypedJson.Python:
| Package | Downloads |
|---|---|
|
Fable.Giraffe.Python
Giraffe for Fable Python |
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 | 140 | 9/5/2026 |
| 5.3.0 | 119 | 8/23/2026 |
| 5.1.0 | 226 | 8/4/2026 |
| 5.0.0 | 186 | 8/4/2026 |
| 5.0.0-rc.1 | 75 | 8/2/2026 |
| 0.4.0 | 130 | 5/21/2026 |
| 0.3.0 | 123 | 5/3/2026 |
| 0.2.0-rc.1 | 70 | 5/1/2026 |