FSharp.Data.JsonProvider

Json generative type provider for F# and .NET.


Keywords
typeproviders, F#, fsharp, JsonProvider, json.net, json, dotnet, type-providers
License
MIT
Install
Install-Package FSharp.Data.JsonProvider -Version 0.5.0

Documentation

NuGet

Json generative type provider

This is a F# type provider which allows you to generate types from string json sample and then use them in F# or C# project.

Screenshot

Usage

You can use it to generate types from json samples (files, web resources, string literals) at design time and then use them in your F#\C# projects.

Examples

In F#:

open FSharp.Data.JsonProvider

type FileType = JsonProvider<"file.txt">

type RelativeFileType = JsonProvider<"../file.txt">

type WebType = JsonProvider<"https://jsonplaceholder.typicode.com/todos/1">

type StringType = JsonProvider<""" { "Data": 1 } """>

Status

OS Build & Test
Mac OS Build Status
Linux Build Status
Windows Build Status

Paket is used to acquire the type provider SDK and build the nuget package.

Build:

.paket\paket.exe update

dotnet build -c Release

Pack:

dotnet test -c Release

.\.paket\paket.exe pack .\output\ --version <version>