Re: [elm-discuss] How to interpret missing fields as Nothing in ports?

2016-10-06 Thread Aaron VonderHaar
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,

[elm-discuss] How to interpret missing fields as Nothing in ports?

2016-10-06 Thread Ed Ilyin
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?