f-o-a-m / kepler

A Haskell framework that facilitates writing ABCI applications
https://kepler.dev
Apache License 2.0
34 stars 9 forks source link

Use proper ToJSON/FromJSON instances for Request/Responce #56

Closed safareli closed 5 years ago

safareli commented 5 years ago

https://github.com/f-o-a-m/hs-abci/issues/44#issuecomment-519429223

charlescrain commented 5 years ago

@safareli do you feel we should change all the instances or just the ones that become Array []?

safareli commented 5 years ago

This is sort of what I mean https://github.com/f-o-a-m/hs-abci/pull/58

But we are lacking fromJSON for ResponseException (for completeness)

@blinky3713 is there some other way to write FromJson instance for Request/response?

charlescrain commented 5 years ago

Ahh got it, so move the message type stuff into the actual json instances.

I wasn't sure how one does the ResponseException since it can be any of the t :: MessageType

safareli commented 5 years ago

yeah I'm confused with that too :D will figure something out tomorrow