Skip to content

Liminiens/json-provider

Repository files navigation

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:

.\build.ps1 --target Build --Configuration Release

Pack:

.\build.ps1 --target Pack --Configuration Release

Built with NUKE