Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.3 KB

readme.md

File metadata and controls

25 lines (19 loc) · 1.3 KB

Funcky.NewtonsoftJson

Build Licence: MIT Licence: Apache

Usage

using Funcky.Monads;
using Funcky.NewtonsoftJson;
using Newtonsoft.Json;

var settings = new JsonSerializerSettings().AddOptionConverter();
var json = JsonConvert.SerializeObject(Option.Some("hello world"), settings);

Using the Converters

The converter implementations are not exposed directly. You can use the extension methods provided for JsonSerializerSettings to add the converters instead.

Extension Method Description
AddFunckyConverters Adds converters for all supported Funcky types (currently only Option).
AddOptionConverter Adds the converter for Option<T>.