Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module will never contain any namespace conflicts with Prelude, so it can be imported unqualified.
Synopsis
- data JSON
- = JSON_Object !(HashMap Text JSON)
- | JSON_Array !(Vector JSON)
- | JSON_String !Text
- | JSON_Number !Scientific
- | JSON_Bool !Bool
- | JSON_Null
Documentation
JSON value abstract syntax tree.
It is intended to be used instead of "aeson" Value
as lingua franca
for JSON libraries, removing the need to depend on "aeson" when all that's needed
is a representation of a JSON value.
Note that this datastructure is representationally identical to "aeson" Value
.
Meaning that conversions between them can be made at 0 performance cost,
(using the unsafeCoerce
function).
The "aeson-json-ast" package provides a typed interface for such conversions.
JSON_Object !(HashMap Text JSON) | |
JSON_Array !(Vector JSON) | |
JSON_String !Text | |
JSON_Number !Scientific | |
JSON_Bool !Bool | |
JSON_Null |
Instances
Data JSON Source # | |
Defined in JSONAST gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JSON -> c JSON # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JSON # dataTypeOf :: JSON -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JSON) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JSON) # gmapT :: (forall b. Data b => b -> b) -> JSON -> JSON # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JSON -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JSON -> r # gmapQ :: (forall d. Data d => d -> u) -> JSON -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JSON -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JSON -> m JSON # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JSON -> m JSON # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JSON -> m JSON # | |
Read JSON Source # | |
Show JSON Source # | |
Eq JSON Source # | |