Skip to content

Instantly share code, notes, and snippets.

@isaacabraham
isaacabraham / idiomaticjsonserialiser.fs
Created Sep 7, 2014
This JSON.Net converter handles F# discriminated unions with more "idiomatic" JSON than what is generated by the current version of JSON .NET. Option types and single case DUs are transparently handled, and tuple-style properties are used rather than array notation.
View idiomaticjsonserialiser.fs
namespace Newtonsoft.Json.Converters
open Microsoft.FSharp.Reflection
open Newtonsoft.Json
open System
type IdiomaticDuConverter() =
inherit JsonConverter()
[<Literal>]
You can’t perform that action at this time.