| Copyright | (C) 2016-2025 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Miso.JSON.Types
Contents
Description
Types for the Miso.JSON module and JSON specification.
This was ported from https://github.com/dmjio/json-test by @ners
Synopsis
- data Value
- data Result a
- = Success a
- | Error MisoString
- type Pair = (MisoString, Value)
- type Object = Map MisoString Value
Types
Constructors
| Number Double | |
| Bool Bool | |
| String MisoString | |
| Array [Value] | |
| Object (Map MisoString Value) | |
| Null |
Instances
| IsString Value Source # | |
Defined in Miso.JSON.Types Methods fromString :: String -> Value # | |
| Show Value Source # | |
| Eq Value Source # | |
| FromJSVal Value Source # | |
| ToJSVal Value Source # | |
| FromJSON Value Source # | |
| ToJSON Value Source # | |
| FromMisoString Value Source # | |
Defined in Miso.JSON Methods fromMisoStringEither :: MisoString -> Either String Value Source # | |
| ToMisoString Value Source # | |
Defined in Miso.JSON Methods toMisoString :: Value -> MisoString Source # | |
Constructors
| Success a | |
| Error MisoString |
Instances
| Alternative Result Source # | |
| Applicative Result Source # | |
| Functor Result Source # | |
| Monad Result Source # | |
| MonadPlus Result Source # | |
| MonadFail Result Source # | |
Defined in Miso.JSON.Types | |
| Foldable Result Source # | |
Defined in Miso.JSON.Types Methods fold :: Monoid m => Result m -> m # foldMap :: Monoid m => (a -> m) -> Result a -> m # foldMap' :: Monoid m => (a -> m) -> Result a -> m # foldr :: (a -> b -> b) -> b -> Result a -> b # foldr' :: (a -> b -> b) -> b -> Result a -> b # foldl :: (b -> a -> b) -> b -> Result a -> b # foldl' :: (b -> a -> b) -> b -> Result a -> b # foldr1 :: (a -> a -> a) -> Result a -> a # foldl1 :: (a -> a -> a) -> Result a -> a # elem :: Eq a => a -> Result a -> Bool # maximum :: Ord a => Result a -> a # minimum :: Ord a => Result a -> a # | |
| Traversable Result Source # | |
| Monoid (Result a) Source # | |
| Semigroup (Result a) Source # | |
| Show a => Show (Result a) Source # | |
| Eq a => Eq (Result a) Source # | |
type Pair = (MisoString, Value) Source #