On Thursday, September 29, 2016 at 4:35:06 PM UTC+1, Rupert Smith wrote:
>
> I also have a little problem with the 'roles' encode to solve. At the 
> moment I have:
>
>         , ( "roles"
>           , case model.roles of
>                 Just roles ->
>                     roles |> List.map roleEncoder |> Encode.list
>
>                 Nothing ->
>                     Encode.null
>           ) 
>
> which will mean 'null' is output when the roles are Nothing.
>

Another option would be if Encode provided 'missing : Value', which means 
skip that field, but it doesn't. 

-- 
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.

Reply via email to