| Maintainer | Toshio Ito <[email protected]> |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Greskell.GraphSON.GValue
Description
This module is for advanced use. Most users should just use Data.Greskell.GraphSON.
This module defines GValue and exposes its deconstructors.
Since: 0.1.2.0
Synopsis
- newtype GValue = GValue {}
- data GValueBody
- nonTypedGValue :: GValueBody -> GValue
- typedGValue' :: Text -> GValueBody -> GValue
- unwrapAll :: GValue -> Value
- unwrapOne :: GValue -> Value
- gValueBody :: GValue -> GValueBody
- gValueType :: GValue -> Maybe Text
GValue type
An Aeson Value wrapped in GraphSON wrapper type. Basically
this type is the Haskell representaiton of a GraphSON-encoded
document.
This type is used to parse GraphSON documents. See also
FromGraphSON class.
Since: 0.1.2.0
Constructors
| GValue | |
Fields | |
Instances
data GValueBody Source #
Constructors
| GObject !(KeyMap GValue) | |
| GArray !(Vector GValue) | |
| GString !Text | |
| GNumber !Scientific | |
| GBool !Bool | |
| GNull |
Instances
| ToJSON GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue Methods toJSON :: GValueBody -> Value # toEncoding :: GValueBody -> Encoding # toJSONList :: [GValueBody] -> Value # toEncodingList :: [GValueBody] -> Encoding # omitField :: GValueBody -> Bool # | |||||
| Generic GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue Associated Types
| |||||
| Show GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue Methods showsPrec :: Int -> GValueBody -> ShowS # show :: GValueBody -> String # showList :: [GValueBody] -> ShowS # | |||||
| Eq GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue | |||||
| Hashable GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue | |||||
| type Rep GValueBody Source # | |||||
Defined in Data.Greskell.GraphSON.GValue type Rep GValueBody = D1 ('MetaData "GValueBody" "Data.Greskell.GraphSON.GValue" "greskell-core-1.0.0.4-AzMvrVXZTMYEQgM8wjhwer" 'False) ((C1 ('MetaCons "GObject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyMap GValue))) :+: (C1 ('MetaCons "GArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector GValue))) :+: C1 ('MetaCons "GString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :+: (C1 ('MetaCons "GNumber" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Scientific)) :+: (C1 ('MetaCons "GBool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "GNull" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
constructors
nonTypedGValue :: GValueBody -> GValue Source #
Create a GValue without "@type" field.
Since: 0.1.2.0
Arguments
| :: Text | "@type" field. |
| -> GValueBody | |
| -> GValue |
Create a GValue with the given "@type" field.
Since: 0.1.2.0
deconstructors
In most cases, you should not use these deconstructors. That is
because internal structure of GValue may vary depending on the
Gremlin server instance and its serializer. You should instead use
parsers based on FromGraphSON class, such
as parseEither.
If you are implementing parsers for GraphSON objects described in Gremlin IO Reference (http://tinkerpop.apache.org/docs/current/dev/io/), you may use these descructors.
gValueBody :: GValue -> GValueBody Source #
Get the GValueBody from GValue.
Since: 0.1.2.0