miso
Copyright(C) 2016-2026 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 String Value

It returns Left err on a lexical or parse error and Right v on success. Error messages include the position and nature of the failure.

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

Documentation