Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ParseException
- prettyPrintParseException :: ParseException -> String
- data Warning = DuplicateKey JSONPath
- parse :: ReaderT JSONPath (ConduitM Event o Parse) Value
- decodeHelper :: FromJSON a => ConduitM () Event Parse () -> IO (Either ParseException ([Warning], Either String a))
- decodeHelper_ :: FromJSON a => ConduitM () Event Parse () -> IO (Either ParseException ([Warning], a))
- specialStrings :: HashSet Text
- isNumeric :: Text -> Bool
- textToScientific :: Text -> Either String Scientific
Documentation
data ParseException Source #
NonScalarKey | |
UnknownAlias | |
UnexpectedEvent | |
InvalidYaml (Maybe YamlException) | |
AesonException String | |
OtherParseException SomeException | |
NonStringKeyAlias AnchorName Value | |
CyclicIncludes |
Instances
Show ParseException Source # | |
Defined in Data.Yaml.Internal showsPrec :: Int -> ParseException -> ShowS # show :: ParseException -> String # showList :: [ParseException] -> ShowS # | |
Exception ParseException Source # | |
Defined in Data.Yaml.Internal |
prettyPrintParseException :: ParseException -> String Source #
Alternative to show
to display a ParseException
on the screen.
Instead of displaying the data constructors applied to their arguments,
a more textual output is returned. For example, instead of printing:
InvalidYaml (Just (YamlParseException {yamlProblem = "did not find expected ',' or '}'", yamlContext = "while parsing a flow mapping", yamlProblemMark = YamlMark {yamlIndex = 42, yamlLine = 2, yamlColumn = 12}})))
It looks more pleasant to print:
YAML parse exception at line 2, column 12, while parsing a flow mapping: did not find expected ',' or '}'
Since 0.8.11
decodeHelper :: FromJSON a => ConduitM () Event Parse () -> IO (Either ParseException ([Warning], Either String a)) Source #
decodeHelper_ :: FromJSON a => ConduitM () Event Parse () -> IO (Either ParseException ([Warning], a)) Source #
specialStrings :: HashSet Text Source #
Strings which must be escaped so as not to be treated as non-string scalars.