Skip to content

Instantly share code, notes, and snippets.

@whitebear-gh
whitebear-gh / Json.fs
Last active May 15, 2018 08:44
Giraffe - Custom json serializer - require all properties except optional
open Newtonsoft.Json
open Newtonsoft.Json.Converters
module Json =
// Custom Json serialization / deserialization settings to be applied for the whole backend
let serializationSettingsEx =
let settings = JsonSerializerSettings()
settings.Converters.Add(OptionConverter())
@whitebear-gh
whitebear-gh / query.fsx
Last active January 5, 2018 21:18 — forked from Alxandr/query.fsx
[<AutoOpen>]
module Giraffe.Query
open Aether
open Microsoft.AspNetCore.Http
module Helpers =
let konst v _ = v
[<RequireQualifiedAccess>]