A reflection-based JSON serialization library for F# with built-in null safety and F# type support.
FSharp.Json is a JSON serialization library built specifically for F# that uses reflection to automatically map F# types to JSON representations. It solves the problem of cumbersome JSON serialization in F# by providing out-of-the-box support for F# types like records, discriminated unions, and options while maintaining strict null safety.
F# developers who need to serialize and deserialize JSON data in their applications, particularly those working with complex F# type systems who want automatic mapping without manual configuration.
Developers choose FSharp.Json because it provides native F# type support with automatic reflection-based mapping, strict null safety that aligns with F# best practices, and an easy-to-use API that reduces boilerplate code compared to other JSON libraries.
F# JSON Reflection based serialization library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses reflection to automatically serialize and deserialize F# types like records and discriminated unions without manual configuration, as demonstrated in the basic usage example.
Enforces F# best practices by preventing null values in non-option types and properly handling option types, detailed in the null safety section with examples for customization.
Natively supports F# constructs such as discriminated unions with multiple serialization modes, maps, and lists, as documented in the unions and supported types sections.
Allows extensive customization of field naming, union representations, and type transforms, shown with examples for snake case, epoch time conversions, and union modes.
Reliance on runtime reflection can lead to slower serialization and deserialization compared to libraries using code generation, which may impact high-throughput applications.
Features like union modes and type transforms require intricate configuration and attributes, making advanced use cases cumbersome, as seen in the unions and type transform sections with incomplete documentation hints.
As a specialized F# library, it has fewer community resources and third-party integrations compared to established options like Newtonsoft.Json, potentially affecting tooling and support.
FSharp.Json is an open-source alternative to the following products: