the-sett / decode-generic / Json.Decode.Generic

Decodes JSON into a data model that is generic enough to describe any JSON.

For working with any JSON.


type Json
    = JString String
    | JBool Basics.Bool
    | JInt Basics.Int
    | JFloat Basics.Float
    | JNull
    | JObj (Dict String Json)
    | JArr (List Json)

A data structure describing the contents of any JSON.

json : Json.Decode.Decoder Json

A JSON decoder that works with any JSON, decoding into the generic data model.