This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.0.1
We were not able to find the expected elm-package.json file at this tag.
Tag 2.0.0
Committed At 2018-08-26 20:35:07 UTC



    Elm JSON Tree View

    This library provides a JSON tree view. You feed it JSON, and it transforms it into interactive HTML.

    Try the online demo (source)


    • show JSON as a tree of HTML
    • expand/collapse nodes in the tree
    • expand/collapse the entire tree
    • select scalar values in the tree


    See the docs or look at the example app's source code.

    But if you really insist on something super simple, here goes:

    import JsonTree
    import Html exposing (text)
    main =
        JsonTree.parseString """[1,2,3]"""
            |> (\tree -> JsonTree.view tree config JsonTree.defaultState)
            |> Result.withDefault (text "Failed to parse JSON")
    config = { onSelect = Nothing, toMsg = always () }

    Note that the above example is only meant to give you a taste. It does not wire everything up, which means that some things will be broken (i.e. expand/collapse). See the docs and the example app for more details.


    UI based on Gildas Lormeau's JSONView Chrome extension.