| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Composite.Aeson.Refined
Contents
Synopsis
- refinedJsonFormat :: Predicate p a => JsonFormat e a -> JsonFormat e (Refined p a)
Documentation
refinedJsonFormat :: Predicate p a => JsonFormat e a -> JsonFormat e (Refined p a) Source #
Given a , produce a JsonFormat e aJsonFormat e ( where Refined p a)p is some Predicate from the refined library for a.
This maps to the same JSON as the given JsonFormat, but when parsing it will apply refine to assert that the incoming JSON value conforms to the
predicate, failing to parse if not.
Orphan instances
| (DefaultJsonFormat a, Predicate p a) => DefaultJsonFormat (Refined p a) Source # | |
Methods defaultJsonFormat :: JsonFormat e (Refined p a) # defaultJsonFormatList :: JsonFormat e [Refined p a] # | |