Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
Instances
FromJSON GValue Source # | Parse |
ToJSON GValue Source # | Reconstruct |
Defined in Data.Greskell.GraphSON.GValue | |
Generic GValue Source # | |
Show GValue Source # | |
Eq GValue Source # | |
FromGraphSON GValue Source # | |
Defined in Data.Greskell.GraphSON | |
Hashable GValue Source # | |
Defined in Data.Greskell.GraphSON.GValue | |
type Rep GValue Source # | |
Defined in Data.Greskell.GraphSON.GValue type Rep GValue = D1 ('MetaData "GValue" "Data.Greskell.GraphSON.GValue" "greskell-core-1.0.0.1-rryKB16Rb9C5omdx8O5fp" 'True) (C1 ('MetaCons "GValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GraphSON GValueBody)))) |
data GValueBody Source #
GObject !(KeyMap GValue) | |
GArray !(Vector GValue) | |
GString !Text | |
GNumber !Scientific | |
GBool !Bool | |
GNull |
Instances
constructors
nonTypedGValue :: GValueBody -> GValue Source #
Create a GValue
without "@type" field.
Since: 0.1.2.0
:: 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