[
    {
        "name": "Json.Decode.Exploration",
        "comment": " An experiment with adding stronger error-types to JSON decoders.\n\n\n# Primitives\n\n@docs Decoder, string, bool, int, float\n\n\n# Data Structures\n\n@docs nullable, list, array, dict, keyValuePairs\n\n\n# Object Primitives\n\n@docs field, at, index\n\n\n# Inconsistent Structure\n\n@docs maybe, oneOf\n\n\n# Run Decoders\n\n@docs decodeString, decodeValue, Value, Path, Node\n\n\n# Errors\n\n@docs Error, ErrorType, MisMatch, StructuralIssue\n\n\n# Interop\n\n@docs custom, toClassic\n\n\n# Mapping\n\n@docs andMap, map, map2, map3, map4, map5\n\n\n# Fancy Decoding\n\n@docs lazy, value, null, succeed, fail, andThen\n\n",
        "unions": [
            {
                "name": "Error",
                "comment": " A decode error.\n",
                "args": [],
                "cases": [
                    [
                        "InvalidJSON",
                        []
                    ],
                    [
                        "Error",
                        [
                            "ErrorType"
                        ]
                    ],
                    [
                        "InContext",
                        [
                            "{ path : Path, error : ErrorType }"
                        ]
                    ]
                ]
            },
            {
                "name": "ErrorType",
                "comment": " A specific type of error.\n",
                "args": [],
                "cases": [
                    [
                        "Structural",
                        [
                            "StructuralIssue"
                        ]
                    ],
                    [
                        "TypeMisMatch",
                        [
                            "MisMatch"
                        ]
                    ],
                    [
                        "BadOneOf",
                        [
                            "List Error"
                        ]
                    ],
                    [
                        "BadMap",
                        [
                            "Error",
                            "Error"
                        ]
                    ],
                    [
                        "Custom",
                        [
                            "String"
                        ]
                    ]
                ]
            },
            {
                "name": "MisMatch",
                "comment": " A type mistmatch.\n",
                "args": [],
                "cases": [
                    [
                        "ExpectedInt",
                        []
                    ],
                    [
                        "ExpectedFloat",
                        []
                    ],
                    [
                        "ExpectedString",
                        []
                    ],
                    [
                        "ExpectedNull",
                        []
                    ],
                    [
                        "ExpectedBool",
                        []
                    ]
                ]
            },
            {
                "name": "Node",
                "comment": " A piece of the path, either a field or an index in an array.\n",
                "args": [],
                "cases": [
                    [
                        "Field",
                        [
                            "String"
                        ]
                    ],
                    [
                        "Index",
                        [
                            "Int"
                        ]
                    ]
                ]
            },
            {
                "name": "StructuralIssue",
                "comment": " A structural issue with your JSON.\n",
                "args": [],
                "cases": [
                    [
                        "ExpectedField",
                        [
                            "String"
                        ]
                    ],
                    [
                        "ExpectedArrayIndex",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "ExpectedArray",
                        []
                    ],
                    [
                        "ExpectedObject",
                        []
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Decoder",
                "comment": " A Decoder is simply a function that turns a `Value` into a `Result Error a`\n",
                "args": [
                    "a"
                ],
                "type": "Value -> Result Error a"
            },
            {
                "name": "Path",
                "comment": " A path through your JSON that leads to the problematic value.\n",
                "args": [],
                "type": "List Node"
            },
            {
                "name": "Value",
                "comment": " A JSON value.\n",
                "args": [],
                "type": "Value"
            }
        ],
        "values": [
            {
                "name": "andMap",
                "comment": " Allows pipelining decoders rather than having large `mapN` calls.\n",
                "type": "Decoder a -> Decoder (a -> b) -> Decoder b"
            },
            {
                "name": "andThen",
                "comment": " Executes a second decoder with the result of another decoder as its first\nargument.\n",
                "type": "(a -> Decoder b) -> Decoder a -> Decoder b"
            },
            {
                "name": "array",
                "comment": " Decode a JSON array into an Elm `Array`.\n",
                "type": "Decoder a -> Decoder (Array a)"
            },
            {
                "name": "at",
                "comment": " Decodes the contents of the field named by following the path constructed by\nthe fieldnames passed as the first arg with the given decoder.\n",
                "type": "List String -> Decoder a -> Decoder a"
            },
            {
                "name": "bool",
                "comment": " Decode a JSON boolean into an Elm `Bool`.\n",
                "type": "Decoder Bool"
            },
            {
                "name": "custom",
                "comment": " Allow using a classical `Json.Decode.Decoder` decoder.\n",
                "type": "Decoder a -> Decoder a"
            },
            {
                "name": "decodeString",
                "comment": " Parse the given string into a JSON value and then run the `Decoder` on it.\nThis will fail if the string is not well-formed JSON or if the `Decoder` fails\nfor some reason.\n",
                "type": "Decoder a -> String -> Result Error a"
            },
            {
                "name": "decodeValue",
                "comment": " Run a `Decoder` on some JSON `Value`. You can send these JSON values through\nports, so that is probably the main time you would use this function.\n",
                "type": "Decoder a -> Value -> Result Error a"
            },
            {
                "name": "dict",
                "comment": " Decode a JSON object into an Elm `Dict`.\n",
                "type": "Decoder a -> Decoder (Dict String a)"
            },
            {
                "name": "fail",
                "comment": " A decoder that always fails.\n",
                "type": "String -> Decoder a"
            },
            {
                "name": "field",
                "comment": " Decodes the contents of the field named in the first argument with the\npassed decoder.\n",
                "type": "String -> Decoder a -> Decoder a"
            },
            {
                "name": "float",
                "comment": " Decode a JSON number into an Elm `Float`.\n",
                "type": "Decoder Float"
            },
            {
                "name": "index",
                "comment": " Decode the value at a given index in a JSON array.\n",
                "type": "Int -> Decoder a -> Decoder a"
            },
            {
                "name": "int",
                "comment": " Decode a JSON number into an Elm `Int`.\n",
                "type": "Decoder Int"
            },
            {
                "name": "keyValuePairs",
                "comment": " Decodes a JSON object into a list of key-value pairs.\n",
                "type": "Decoder a -> Decoder (List ( String, a ))"
            },
            {
                "name": "lazy",
                "comment": " Creates a lazy decoder, useful for recursive structures.\n",
                "type": "(() -> Decoder a) -> Decoder a"
            },
            {
                "name": "list",
                "comment": " Decodes a JSON array into an Elm `List`.\n",
                "type": "Decoder a -> Decoder (List a)"
            },
            {
                "name": "map",
                "comment": " Transform a decoder by mapping the result.\n",
                "type": "(a -> b) -> Decoder a -> Decoder b"
            },
            {
                "name": "map2",
                "comment": " Execute a function on the result of 2 decoders.\n",
                "type": "(a -> b -> c) -> Decoder a -> Decoder b -> Decoder c"
            },
            {
                "name": "map3",
                "comment": " Execute a function on the result of 3 decoders.\n",
                "type": "(a -> b -> c -> d) -> Decoder a -> Decoder b -> Decoder c -> Decoder d"
            },
            {
                "name": "map4",
                "comment": " Execute a function on the result of 4 decoders.\n",
                "type": "(a -> b -> c -> d -> e) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e"
            },
            {
                "name": "map5",
                "comment": " Execute a function on the result of 5 decoders.\n",
                "type": "(a -> b -> c -> d -> e -> f) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e -> Decoder f"
            },
            {
                "name": "maybe",
                "comment": " Decode a value that may or may not exist, or might be malformed.\n",
                "type": "Decoder a -> Decoder (Maybe a)"
            },
            {
                "name": "null",
                "comment": " Decode a JSON null into an Elm value.\n",
                "type": "a -> Decoder a"
            },
            {
                "name": "nullable",
                "comment": " Decode a value that must exist but _could_ be `null`.\n",
                "type": "Decoder a -> Decoder (Maybe a)"
            },
            {
                "name": "oneOf",
                "comment": " Tries these decoders one by one. The first one to succeed will have its\nvalue returned. If no decoders were passed or all decoders fail, you'll get an\nerror.\n",
                "type": "List (Decoder a) -> Decoder a"
            },
            {
                "name": "string",
                "comment": " Decode a JSON string into an Elm `String`.\n",
                "type": "Decoder String"
            },
            {
                "name": "succeed",
                "comment": " A decoder that always succeeds.\n",
                "type": "a -> Decoder a"
            },
            {
                "name": "toClassic",
                "comment": " Allow using an exploration decoder in a regular `Json.Decode` context.\n",
                "type": "Decoder a -> Decoder a"
            },
            {
                "name": "value",
                "comment": " Doesn't modify the JS value, just returns it.\n",
                "type": "Decoder Value"
            }
        ],
        "binops": []
    }
]