At NoRedInk, if we are passing complex data through a port, we generally
pass it as `Json.Value`, and then use a JSON decoder in Elm to transform it
into the appropriate type.  That way, you can write a decoder to handle
missing fields in whatever way you'd like.

On Thu, Oct 6, 2016 at 11:18 AM, Ed Ilyin <[email protected]> wrote:

> Hi,
>
> When you send record with Maybe fields to a port - Nothing values are
> converted to nulls.
> When you send json with null properties to firebase - firebase removes
> such properties (by design)
> When you try to receive record from port - how to force Elm to interpret
> missing fields as Nothing?
>
> I have seen old https://github.com/elm-lang/elm-plans/issues/17 and
> https://github.com/elm-lang/elm-compiler/issues/1007 issues
>
> What can I do except making conversion of each object in javascript?
>
> --
> 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.
>

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