Skip to content

Predicates for JSON and YAML #5

@cdsmith

Description

@cdsmith

It would be nice to have a collection of predicates for asserting things about data in file formats like JSON and YAML. Something like:

-- Parsing combinators
inJSON :: Predicate Aeson.Value -> Predicate ByteString
inYAML :: Predicate Aeson.Value -> Predicate ByteString

-- JSON-typed comparisons
aesonArray :: Predicate [Aeson.Value] -> Predicate Aeson.Value
aesonObject :: Predicate (HashMap Text Aeson.Value) -> Predicate Aeson.Value
aesonNumber :: Predicate Scientific -> Predicate Aeson.Value
aesonText :: Predicate Text -> Predicate Aeson.Value
aesonBool :: Predicate Bool -> Predicate Aeson.Value
aesonNull :: Predicate Aeson.Value

-- Tree search
containsAeson :: Predicate Aeson.Value -> Predicate Aeson.Value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions