[{"name":"Json.InElm","comment":"\n\n\n# JSON Document and Property Types\n\nA \"JSON document\", here, is described as:\n\n  - A JSON object\n  - A list of JSON objects or scalar properties\n\nFor convenience, even though it's not in the JSON spec, I have included ISO8601 timestamp values as a \"JSON property type\".\n\n@docs JValue\n@docs JProp\n@docs Keypath\n@docs Node\n\n\n# Parsing\n\n@docs parseJsonString\n@docs parseValue\n@docs parseValueAt\n@docs toDecoder\n\n\n# Retrieving values from a `JValue`\n\n@docs toNodes\n@docs toString\n@docs toInt\n@docs toFloat\n@docs toBool\n@docs toTime\n@docs toList\n@docs toObject\n@docs toNull\n\n\n# Viewing a `Node`\n\n@docs view\n\n","unions":[{"name":"JProp","comment":" A `JProp` represents the type of a scalar property within a JSON document. These are regarded separately\nfrom the `JValue` type for a few important reasons:\n\n  - Since this package is concerned with parsing an arbitrary JSON document and lifting it into a type that allows it to be\n    used within an Elm program, this means that the JSON schema is derived ad-hoc from user input.\n  - And so, an ad-hoc JSON schema cannot exist without values.\n  - However, if we are going to to store references to locations within that ad-hoc JSON schema, we are likely doing so because\n    we would like to retrieve some value at a given location from a JSON document that is different from the original input.\n\nIn order to create a distinction between \"a parsed JSON value\" and \"a reference to a location within a JSON document\", it must\nbe the case that we have another way to represent the concept of \"the expected type of a value at a location within a JSON document\"\nthat is separate from \"a value at a location within a JSON document, from which the type is derived\".\n\nCreating a second type was the most straightforward way to implement this behavior.\n\n","args":[],"cases":[["PString",[]],["PInt",[]],["PFloat",[]],["PBool",[]],["PTime",[]],["PNull",[]]]},{"name":"JValue","comment":" A `JValue` represents a typed value within a JSON document.\n","args":[],"cases":[["JString",["String.String"]],["JInt",["Basics.Int"]],["JFloat",["Basics.Float"]],["JBool",["Basics.Bool"]],["JTime",["Time.Posix"]],["JList",["List.List Json.InElm.Node"]],["JObject",["List.List ( String.String, Json.InElm.Node )"]],["JNull",[]]]}],"aliases":[{"name":"Keypath","comment":" A `Keypath` is a data structure that stores the JSON path to a value of a given key.\n\nElements in a `Keypath` are either the name of a field, or the index of an array.\n\nUse the functions in the `Json.InElm.Keypath` module to work with `Keypath` values.\n\n","args":[],"type":"Json.InElm.Keypath.Internal.Keypath"},{"name":"Node","comment":" A `Node` is a reprentation of part of a JSON document, along with everything that is inside of it,\nalong with its \"key path\", which is its location within a JSON document.\n\nThis means that the output of the parser will always be a single `Node`; but depending on the input,\nthat `Node`'s `JValue` may have other `Node`s inside of it.\n\n","args":[],"type":"{ value : Json.InElm.JValue, keypath : Json.InElm.Keypath, jProp : Maybe.Maybe Json.InElm.JProp }"}],"values":[{"name":"parseJsonString","comment":" Parse a raw JSON string to a `Node`.\n","type":"String.String -> Result.Result Json.Decode.Error Json.InElm.Node"},{"name":"parseValue","comment":" Parse a `Json.Decode.Value` to a `Node`.\n","type":"Json.Decode.Value -> Result.Result Json.Decode.Error Json.InElm.Node"},{"name":"parseValueAt","comment":" Parse a `Json.Decode.Value` to a `Node`, at a given `KeyPath`.\n","type":"Json.InElm.Keypath -> Json.Decode.Value -> Result.Result Json.Decode.Error Json.InElm.Node"},{"name":"toBool","comment":" Try to get a `Bool` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe Basics.Bool"},{"name":"toDecoder","comment":" Create a decoder to a `Node`, given a `Keypath`.\n","type":"Json.InElm.Keypath -> Json.Decode.Decoder Json.InElm.Node"},{"name":"toFloat","comment":" Try to get a `Float` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe Basics.Float"},{"name":"toInt","comment":" Try to get a `Int` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe Basics.Int"},{"name":"toList","comment":" Try to get a `List Node` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe (List.List Json.InElm.Node)"},{"name":"toNodes","comment":" From a `Node`, get all possible `Node`s.\n","type":"Json.InElm.Node -> List.List Json.InElm.Node"},{"name":"toNull","comment":" Try to see if a `JValue` contains a JSON `null`.\n","type":"Json.InElm.JValue -> Maybe.Maybe ()"},{"name":"toObject","comment":" Try to get a `List (String, Node)` from a `JValue`, where the `String`\nvalue is the name of the field in the object.\n","type":"Json.InElm.JValue -> Maybe.Maybe (List.List ( String.String, Json.InElm.Node ))"},{"name":"toString","comment":" Try to get a `String` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe String.String"},{"name":"toTime","comment":" Try to get a `Time` from a `JValue`.\n","type":"Json.InElm.JValue -> Maybe.Maybe Time.Posix"},{"name":"view","comment":" Combinator that allows you to build a view function that renders a `Node`; i.e., if _you_ can provide all of the functions\nto destructure a `Node`, we can display it for you!\n","type":"{ string : String.String -> Html.Html msg, int : Basics.Int -> Html.Html msg, float : Basics.Float -> Html.Html msg, bool : Basics.Bool -> Html.Html msg, time : Time.Posix -> Html.Html msg, null : Html.Html msg, list : List.List (Html.Html msg) -> Html.Html msg, object : { key : String.String, value : Html.Html msg } -> Html.Html msg, withKeypath : Maybe.Maybe (String.String -> Html.Html msg -> Html.Html msg), withOnClick : Maybe.Maybe (Json.InElm.Node -> msg) } -> Json.InElm.Node -> Html.Html msg"}],"binops":[]},{"name":"Json.InElm.Keypath","comment":"\n\n@docs FieldAccessor\n@docs at\n@docs index\n@docs init\n@docs toString\n@docs fold\n\n","unions":[],"aliases":[{"name":"FieldAccessor","comment":" Representation of a value used to access a field in a JSON document.\n","args":[],"type":"Json.InElm.Keypath.Internal.FieldAccessor"}],"values":[{"name":"at","comment":" Updates a `KeyPath` and adds the name of a field in a JSON document.\n","type":"String.String -> Json.InElm.Keypath.Keypath -> Json.InElm.Keypath.Keypath"},{"name":"fold","comment":" Fold over the values in a `KeyPath` to transform them into a value of some other type.\n\n(Hint: `toString` implements `fold` directly! You can check out the source on Github to see how it's done.)\n\n","type":"(a -> b -> b) -> { fromIndex : Basics.Int -> a, fromAt : String.String -> a } -> b -> Json.InElm.Keypath.Keypath -> b"},{"name":"index","comment":" Updates a `KeyPath` and adds the value of an index in a JSON array.\n","type":"Basics.Int -> Json.InElm.Keypath.Keypath -> Json.InElm.Keypath.Keypath"},{"name":"init","comment":" To construct a `Keypath`, you must start with an empty value.\n","type":"Json.InElm.Keypath.Keypath"},{"name":"toString","comment":" Renders a `Keypath` to a string.\n","type":"Json.InElm.Keypath.Keypath -> String.String"}],"binops":[]}]