aeson-extra-0.3.1.0: Extra goodies for aeson

Copyright(C) 2015-2016 Oleg Grenrus
LicenseBSD3
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Extra.SingObject

Description

 

Synopsis

Documentation

newtype SingObject s a Source

Singleton value object

λ > decode "{\"value\": 42 }" :: Maybe (SingObject "value" Int)
Just (SingObject 42)
λ > encode (SingObject 42 :: SingObject "value" Int)
"{\"value\":42}"

Available with: base >=4.7

Constructors

SingObject a