Additions:
fromMaybe: LikefromResultbut forMaybe a
Additions:
optionalNullableField: PuttingoptionalFieldandnullabletogether
Additions:
url: Decode JSON strings toelm/url#Urls
Removals:
dict:elm/jsonalready comes with adictencoder
Additions:
datetime: Re-introduce decoding a date+time, toPosix
Changes:
- doc tests are re-enabled
- docs are fixed
Removals
date: Initial 0.19 compatibility means (temporarily) removing the `date** decoder
Other stuff:
- Elm 0.19 support!
- doc tests are disabled for now
Additions:
keysallows extracting only the keys from a JSON object
Additions:
dicthelps encodingDict
Additions:
collectionhelps with decoding array-like JavaScript structures such asHTMLCollectioncombinehelps combining aListof decoders into a singleDecoderfor aListof such things
Additions:
indexedListto get access to the current js array index while decoding
Other Stuff:
elm-doc-testis nowelm-verify-examples!
Additions:
parseIntandparseFloatfor weird api's that return numbers as stringsdoubleEncodedfor a more generic json as a string in json issues
Fixes:
optionalFielddecodes the field, rather than the surrounding object now.
Other Stuff:
- Code Style conforms to elm-format@exp
- Doc tests!
- Travis integration
Additions:
optionalField : String -> Json.Decode.Decoder a -> Json.Decode.Decoder (Maybe.Maybe a)- Decode an optional field, succeeding withNothingif it is missing, but still giving an error if it is malformed.
Breaking Changes:
- Upgrade for Elm 0.18
- Removed
maybeNullin favor ofJson.Decode.nullable - Removed
lazyin favor ofJson.Decode.lazy - Renamed
applytoandMapand reversed arguments toDecoder a -> Decoder (a -> b) -> Decoder bto make it work nicely with(|>)
Additions:
fromResult : Result String a -> Decoder a- convert aResultto aDecoder, helpful inandThencallbacks following the removal ofJson.Decode.customDecoderJson.Encode.Extra.maybe : (a -> Value) -> Maybe a -> Value- encode aMaybe agiven an encoder fora. Thanks to @hendore for this addition.
Other Stuff:
- Code style conforms to elm-format
Additions:
Json.Decode.Extra.sequence- lets you generate a list ofDecoder aand attempt to apply them to a JSON list. Authored by @cobalamin
Breaking Changes:
- Upgrade for Elm 0.17