Skip to content

Predicates for JSON and YAML #5

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions