ogma-language-jsonspec-1.12.0: Ogma: Runtime Monitor translator: JSON Frontend
Safe HaskellNone
LanguageHaskell2010

Language.JSONSpec.Parser

Description

Parser for Ogma specs stored in JSON files.

Synopsis

Documentation

data JSONFormat Source #

Constructors

JSONFormat 

Fields

Instances

Instances details
Read JSONFormat Source # 
Instance details

Defined in Language.JSONSpec.Parser

Methods

readsPrec :: Int -> ReadS JSONFormat

readList :: ReadS [JSONFormat]

readPrec :: ReadPrec JSONFormat

readListPrec :: ReadPrec [JSONFormat]

parseJSONSpec :: (String -> IO (Either String a)) -> JSONFormat -> Value -> IO (Either String (Spec a)) Source #

valueToString :: String -> Value -> Either String String Source #

listToEither :: String -> [a] -> Either String a Source #

parseJSONPath :: Text -> Either String [JSONPathElement] Source #

Parse a JSONPath expression, returning its element components.

showErrors :: Show a => Either a b -> Either String b Source #

showErrorsM :: Show a => Maybe (Either a b) -> Either String (Maybe b) Source #

except :: forall (m :: Type -> Type) e a. Monad m => Either e a -> ExceptT e m a Source #

Wrap an Either value in an ExceptT m monad.

maybeEither :: Maybe (Either a b) -> Either a (Maybe b) Source #

Swap the order in a Maybe and an Either monad.