ogma-language-jsonspec-1.15.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 FieldSource Source #

Source used to populate the value of a field in a spec.

Constructors

JSONPath String

JSON path

FileName

Filename with extension

BaseName

Filename without extension

Instances

Instances details
Read FieldSource Source #

Custom instance to read a FieldSource that allows JSON paths to be written down as plain strings.

Instance details

Defined in Language.JSONSpec.Parser

Show FieldSource Source # 
Instance details

Defined in Language.JSONSpec.Parser

data JSONFormatInternal Source #

Constructors

JSONFormatInternal 

Fields

data FieldSourceInternal Source #

Internal representation of the source used to populate the value of a field in a spec.

Constructors

FSIJSONPath [JSONPathElement]

JSON path

FSIFileName

Filename with extension

FSIBaseName

Filename without extension

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

Parse a JSONPath expression, returning its element components.

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.