Copyright | (c) Duncan Coutts 2015 2017 |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Documentation
JSNull | |
JSBool ! Bool | |
JSNum ! Int54 | |
JSString ! JSString | |
JSArray [ JSValue ] | |
JSObject [( JSString , JSValue )] |
Instances
Eq JSValue Source # | |
Ord JSValue Source # | |
Defined in Text.JSON.Canonical.Types |
|
Read JSValue Source # | |
Show JSValue Source # | |
NFData JSValue Source # | |
Defined in Text.JSON.Canonical.Types |
|
Monad m => FromJSON m JSValue Source # | |
Monad m => ToJSON m JSValue Source # | |
54-bit integer values
JavaScript can only safely represent numbers between
-(2^53 - 1)
and
2^53 - 1
.
TODO: Although we introduce the type here, we don't actually do any bounds
checking and just inherit all type class instance from Int64. We should
probably define
fromInteger
to do bounds checking, give different instances
for type classes such as
Bounded
and
FiniteBits
, etc.
Instances
Canonical JSON strings are in fact just bytes.
Instances
Eq JSString Source # | |
Ord JSString Source # | |
Defined in Text.JSON.Canonical.Types |
|
Read JSString Source # | |
Show JSString Source # | |
IsString JSString Source # | |
Defined in Text.JSON.Canonical.Types fromString :: String -> JSString Source # |
|
Semigroup JSString Source # | |
Monoid JSString Source # | |
PrintfArg JSString Source # | |
Defined in Text.JSON.Canonical.Types formatArg :: JSString -> FieldFormatter Source # parseFormat :: JSString -> ModifierParser Source # |
|
NFData JSString Source # | |
Defined in Text.JSON.Canonical.Types |
|
Monad m => FromObjectKey m JSString Source # | |
Defined in Text.JSON.Canonical.Class |
|
Monad m => ToObjectKey m JSString Source # | |
Defined in Text.JSON.Canonical.Class toObjectKey :: JSString -> m JSString Source # |
|
ReportSchemaErrors m => FromJSON m JSString Source # | |
Monad m => ToJSON m JSString Source # | |
toJSString :: String -> JSString Source #
fromJSString :: JSString -> String Source #