Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
type Validation a = ValidationT ErrorMap Identity a Source #
data ParseResult a Source #
Instances
isValid :: ParseResult a -> Bool Source #
isDecodingError :: ParseResult a -> Bool Source #
isValidationError :: ParseResult a -> Bool Source #
validateTextConstraint :: JSONPath -> Text -> Sing (tcs :: TextConstraint) -> Validation () Source #
validateNumberConstraint :: JSONPath -> Scientific -> Sing (tcs :: NumberConstraint) -> Validation () Source #
validateArrayConstraint :: JSONPath -> Vector a -> Sing (tcs :: ArrayConstraint) -> Validation () Source #
validateJsonRepr :: Sing schema -> [DemotedPathSegment] -> JsonRepr schema -> Validation () Source #
toUnion :: USubset s' (s ': ss) (RImage s' (s ': ss)) => Sing (s ': ss) -> Union JsonRepr s' -> JsonRepr (SchemaUnion (s ': ss)) Source #
parseAndValidateJson :: forall schema. (FromJSON (JsonRepr schema), TopLevel schema, SingI schema) => Value -> ParseResult (JsonRepr schema) Source #
parseAndValidateJsonBy :: (FromJSON (JsonRepr schema), TopLevel schema, SingI schema) => proxy schema -> Value -> ParseResult (JsonRepr schema) Source #