| Copyright | (C) 2016-2026 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Miso.JSON.Parser
Description
Overview
Miso.JSON.Parser is the second stage of miso's pure Haskell JSON
pipeline, used for server-side rendering (SSR). It takes the Token
stream produced by Miso.JSON.Lexer and builds a Value
tree.
The single public entry point is decodePure:
decodePure::MisoString-> Either StringValue
It returns on a lexical or parse error and Left err on
success. Error messages include the position and nature of the failure.Right v
This module is internal. Use decodePure via Miso.JSON in
application code.
This module was ported from https://github.com/dmjio/json-test by @ners.
See also
- Miso.JSON.Lexer — tokenizer that feeds this parser
- Miso.JSON.Types —
ValueandResulttypes - Miso.Util.Parser — the underlying parser combinator library
Documentation
decodePure :: MisoString -> Either String Value Source #