lue-bird / elm-morph / Json

JSON. See also Json.Morph


type alias Json =
Value.AtomOrComposed Atom Composed

A valid JSON value. caseable. Elm doesn't crash on ==. Can't contain any spooky impure stuff


type Atom
    = Null ()
    | Bool Basics.Bool
    | Number Decimal
    | String String

json atom. null/bool/number or string


type Composed
    = Array (Array Json)
    | Object (List Tagged)

json structure. record/object/dict or array


type alias Tagged =
RecordWithoutConstructorFunction { tag : String
, value : Json 
}

tag-value pair used to represent a field

create

fromValue : Value String -> Json

Convert from a generic representation of an elm value

transform

toValue : Json -> Value String

Convert to a generic representation of an elm value