Json2Fs 0.0.1

dotnet tool install --global Json2Fs --version 0.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Json2Fs --version 0.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Json2Fs&version=0.0.1
nuke :add-package Json2Fs --version 0.0.1

json2fs

Tool which converts json from file into F# records. There's also library Json2Fs.Core. Both can be found on nuget.org.

Usage of Json2Fs

Get it from nuget:

dotnet tool install json2fs --global --prerelease

Run it like this:

json2fs WebsiteResponse your/path/to.json dst.fs

Where WebsiteResponse is the name of the root record (the one you will be deserializing into).

Usage of Json2Fs.Core

open Json2Fs.Core

let json = ... // string

let jsonElement = JsonSerializer.Deserialize<JsonElement> json

let dtos = generateFSharpDTOsByJson typename jsonElement // a list of records

let ``F# code`` = fsRecordsToString dtos // this converts it to the actual code
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.0.1 260 2/8/2022