Last active
December 17, 2015 06:49
-
-
Save reite/5568677 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
objToArray :: Value -> Array | |
objToArray obj@(Object v) = V.singleton obj | |
--I need a value of type Value for further processing. How can I make the result Array into a Value type? | |
-- Definitions of types from source of Data.Aeson.Types | |
-- | A JSON \"object\" (key\/value map). | |
type Object = HashMap Text Value | |
-- | A JSON \"array\" (sequence). | |
type Array = Vector Value | |
-- | A JSON value represented as a Haskell value. | |
data Value = Object !Object | |
| Array !Array | |
| String !Text | |
| Number !Number | |
| Bool !Bool | |
| Null | |
deriving (Eq, Show, Typeable) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment