On Monday, October 24, 2016 at 7:28:30 AM UTC-7, Rupert Smith wrote: > > What do you do with fields in the json that are missing or null? I can see > for example that for an 'int' you just use Decode.int as the decoder, so I > guess you will get a Result.Err and fail when the value is missing? >
I was thinking something like this would work for that case: here <http://package.elm-lang.org/packages/NoRedInk/elm-decode-pipeline/2.0.0/Json-Decode-Pipeline#nullable> On Monday, October 24, 2016 at 7:23:43 AM UTC-7, Rupert Smith wrote: > > Mostly field names will match record fields, but sometimes they might not, > so having an ability to name them differently to the name of the field in > the Elm record could be useful. > This is a great suggestion! -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
