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