Closed kfl closed 10 years ago
Thanks! However, as mentioned, in this case I prefer to make an explicit ToJSON
instance, so that the communication protocol is specified entirely within the Threepenny source code and does not rely on (non-existing) documentation of the aeson
library (at least for aeson-0.6).
I agree that making the ToJSON
instance explicit is better.
However, I don't think that it is the right JSON encoding, so I have made an updated version that mimics genericToJSON
rather than Data.Aeson.Generic
. This is done so that we can avoid the for(var key in event)
construct in driver.js
which is both brittle and somewhat non-deterministic.
Sounds good to me, thanks!
Update
driver.js
to fit with the JSON encoding of sum types thatData.Aeson.genericToJSON
use. Thus really fixing #71.