Closed matsumonkie closed 4 years ago
You are right, it is pretty ugly! I'll try to take a look this week.
I pushed a quick fix for your exact use case. Unfortunately, a complete fix would be a bit more involved (with the new To/FromJSONKey mechanism in aeson).
Does that work for you?
I just had to bump servant-elm
to the latest 0.7.2 but it works perfectly!!
Thank you so much for the quick patch, it helps a lot!!
Wow I did not realize servant-elm depended on elm-bridge!
Hello,
First things first, thank you for this great lib, it helps a lot!! I have a minor question/issue regarding
Dict
serialization.For
Dict
,encodeMap
is used https://github.com/agrafix/elm-bridge/blob/0856922e8c2deabb1fecbfac9fe9eeee0c091913/src/Elm/Json.hs#L180 Because ofencodeMap
, if thekey
is aString
, the json key will be escaped. eg:Is this voluntary? It seems more logical to use Json.Encode.dict to me but maybe I'm missing something...