[{"name":"Json.Decode.Field","comment":" # Decode JSON objects\n\nSince JSON values are not known until runtime there is no way\nof checking them at compile time. This means that there is a\npossibility a decoding operation can not be successfully completed.\n\nIn that case there are two possible solutions:\n\n1. Fail the whole decoding operation.\n2. Deal with the missing value situation, either by defaulting to some value or by\n   using a `Maybe` value\n\nIn this module these two options are represented by `require` and\n`attempt`.\n\n* `require` can fail if the decoding can not be completed.\n* `attempt` will never fail. It always decodes to a `Maybe` value.\n\n@docs require, requireAt, attempt, attemptAt\n\n","unions":[],"aliases":[],"values":[{"name":"attempt","comment":" Decode optional fields.\n\nAlways decodes to a `Maybe` value and never fails.\n\nExample:\n\n    person : Decoder Person\n    person =\n        require \"name\" Decode.string <| \\name ->\n        attempt \"weight\" Decode.int <| \\maybeWeight ->\n\n        Decode.succeed\n            { name = name\n            , weight = maybeWeight\n            }\n\nIn this example the `maybeWeight` value will be `Nothing` if:\n\n* The JSON value was not an object\n* The `weight` field is missing.\n* The `weight` field is not an `Int`.\n\nIn this case there is no difference between a field being `null` or missing.\nIf a field must exist but can be null, use `require` and `Decode.maybe` instead:\n\n    require \"field\" (Decode.maybe Decode.string) <| \\field ->\n\n","type":"String.String -> Json.Decode.Decoder a -> (Maybe.Maybe a -> Json.Decode.Decoder b) -> Json.Decode.Decoder b"},{"name":"attemptAt","comment":" Decode optional nested fields. Works the same way as `attempt` but on nested fields.\n\n","type":"List.List String.String -> Json.Decode.Decoder a -> (Maybe.Maybe a -> Json.Decode.Decoder b) -> Json.Decode.Decoder b"},{"name":"require","comment":" Decode required fields.\n\nExample:\n\n    user : Decoder User\n    user =\n        require \"id\" Decode.int <| \\id ->\n        require \"name\" Decode.string <| \\name ->\n\n        Decode.succeed\n            { id = id\n            , name = name\n            }\n\nIn this example the decoder will fail if:\n\n* The JSON value is not an object.\n* Any of the fields `\"id\"` or `\"name\"` are missing. If the object contains other fields\n  they are ignored and will not cause the decoder to fail.\n* The value of field `\"id\"` is not an `Int`.\n* The value of field `\"name\"` is not a `String`.\n\n","type":"String.String -> Json.Decode.Decoder a -> (a -> Json.Decode.Decoder b) -> Json.Decode.Decoder b"},{"name":"requireAt","comment":" Decode nested fields. Works the same as `require` but on nested fieds.\n\n    blogPost : Decoder BlogPost\n    blogPost =\n        require \"id\" Decode.int <| \\id ->\n        require \"title\" Decode.string <| \\title ->\n        requireAt [\"author\", \"name\"] Decode.string <| \\authorName ->\n\n        Decode.succeed\n            { id = id\n            , title = title\n            , author = authorName\n            }\n","type":"List.List String.String -> Json.Decode.Decoder a -> (a -> Json.Decode.Decoder b) -> Json.Decode.Decoder b"}],"binops":[]}]