Commit Graph

10 Commits (b8ebc57bb7a7a26955c9204cac8031f93a4e5403)

Author SHA1 Message Date
Karchnu b8ebc57bb7 Decoding: use_cbor_discriminator 2020-11-11 04:54:19 +01:00
Karchnu 4ac38a7598 Unmapped values are taken into account in the object mapping size. 2020-11-11 00:45:59 +01:00
Karchnu 5f838d36cc Compute the number of object properties to serialize. 2020-11-10 20:14:50 +01:00
Sorcus 3ab21c9616 Fix typos and remove redundant use of 'Object#to_s' 2020-09-30 10:34:58 +02:00
Alberto Restifo b666ac0c84 Improve documentation and examples tests 2020-05-30 12:37:57 +02:00
Alberto Restifo 6201f2564f Fix old mention of pull 2020-05-27 15:35:28 +02:00
Alberto Restifo 69b9933c3c Add tests for examples 2020-05-27 13:52:29 +02:00
Alberto Restifo 8baacbb606 Add encoding capabilities
* Create CBOR::Encoder, capable of translating Crystal values
* Add `#to_cbor` method to all major types
* Add `#to_cbor` in the CBOR::Serializable macro
2020-05-27 13:22:58 +02:00
Alberto Restifo 9d4c37460c Strict by default and implement Serializable::Unmapped 2020-05-23 17:32:23 +02:00
Alberto Restifo 2f8693ca34 Implement CBOR::Serializable to decode from_cbor
The CBOR::Serializable macro implements a from_cbor method on any
object on which it's included.
2020-05-22 22:06:53 +02:00