Closed mxswd closed 9 years ago
You need to use Message
instead of Value
:
data Person = Person
{ name :: Required 1 (Message Name)
, id :: Required 2 (Value Int32)
, email :: Optional 3 (Value Text)
} deriving (Generic, Show)
Absolutely. The trick is picking the wrapper to encode messages, which are treated a bit differently (on the wire) from primitives and enums. Just choose Message
instead of Value
or Enumeration
.. as @jystic just pointed out :+1:
Awesome thanks! Works great.
Is it possible to nest objects, something like this:
I get an error trying to do this.
If not, one day you may want to consider adding it.