| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Bloodhound.Internal.StringlyTyped
Synopsis
- newtype StringlyTypedDouble = StringlyTypedDouble {}
- newtype StringlyTypedInt = StringlyTypedInt {}
- newtype StringlyTypedBool = StringlyTypedBool {}
- unStringlyTypeJSON :: Value -> Value
Documentation
newtype StringlyTypedDouble Source #
Constructors
| StringlyTypedDouble | |
Fields | |
Instances
| FromJSON StringlyTypedDouble Source # | |
Defined in Database.Bloodhound.Internal.StringlyTyped Methods parseJSON :: Value -> Parser StringlyTypedDouble # parseJSONList :: Value -> Parser [StringlyTypedDouble] # | |
newtype StringlyTypedInt Source #
Constructors
| StringlyTypedInt | |
Fields | |
Instances
| FromJSON StringlyTypedInt Source # | |
Defined in Database.Bloodhound.Internal.StringlyTyped Methods parseJSON :: Value -> Parser StringlyTypedInt # parseJSONList :: Value -> Parser [StringlyTypedInt] # | |
newtype StringlyTypedBool Source #
Constructors
| StringlyTypedBool | |
Fields | |
Instances
| FromJSON StringlyTypedBool Source # | |
Defined in Database.Bloodhound.Internal.StringlyTyped Methods parseJSON :: Value -> Parser StringlyTypedBool # parseJSONList :: Value -> Parser [StringlyTypedBool] # | |
unStringlyTypeJSON :: Value -> Value Source #
For some reason in several settings APIs, all leaf values get returned as strings. This function attempts to recover from this for all non-recursive JSON types. If nothing can be done, the value is left alone.