Jimmy Cuadra
c25d76e20f
Treat deserialization failure as a validation failure.
...
If a ruma-events type fails deserialization, but the input was valid
JSON, this should be treated as a validation failure instead of a
deserialization failure. In this case, attempt to deserialize the json
into a `serde_json::Value`, and only return a deserialization error if
that fails.
2019-07-08 03:34:42 -07:00
Jimmy Cuadra
a65a618930
Run rustfmt.
2019-06-21 17:18:06 -07:00
Jimmy Cuadra
3bad559980
Add serialization and deserialization tests.
2019-06-21 17:00:28 -07:00
Jimmy Cuadra
553d9c05cd
Add support for events with custom types.
2019-06-20 17:05:30 -07:00
Jimmy Cuadra
52754f617c
Import Event trait in Serialize impl so event_type can be called.
2019-06-19 23:36:16 -07:00
Jimmy Cuadra
4423275ce2
Implement RoomEvent and StateEvent when applicable.
2019-06-19 22:40:58 -07:00
Jimmy Cuadra
be0f1d0363
Add inherent impl with from_str method.
2019-06-19 21:14:49 -07:00
Jimmy Cuadra
78e25552fb
Implement Serialize and Event.
2019-06-19 16:52:54 -07:00
Jimmy Cuadra
3b65905784
Generate content types and raw module.
2019-06-19 16:08:43 -07:00
Jimmy Cuadra
2f54ee3e32
Implement generation of structs.
2019-06-18 17:54:50 -07:00