/debug-to-json

Elm pretty printer and to JSON converter for Debug.toString output

Primary LanguageElmBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Debug to JSON

Get a JSON structure from a string generated by Debug.toString.

Install

elm install f0i/debug-to-json

Examples

import DebugToJson

formatted =
    { asdf = "qwer" }
        |> Debug.toString
        |> DebugToJson.pp

formatted will now contain the following String:

{
    "asdf": "qwer"
}

A complete list of the helper functions can be found in the DebugToJson module docs.