Commit Graph

91 Commits (master)

Author SHA1 Message Date
Karchnu c292476cef Limiting the hash key types to integers, floats, bool, string, bytes. 2020-11-30 01:17:35 +01:00
Karchnu 678494cec9 Time.new fixed: now provides a Time instance or raises. 2020-11-28 02:56:01 +01:00
Karchnu b74a1af8e5 CBOR specs: new tests (cbor_discriminator, unions, empty arrays & hashs, objects). 2020-11-28 02:30:10 +01:00
Karchnu 81c91e6eb2 CBOR specs: UUID tests. 2020-11-28 01:38:53 +01:00
Karchnu a8d76a9496 CBOR specs: Time tests. 2020-11-28 01:38:00 +01:00
Karchnu bd49ce7655 Fixing (Bool | Nil) union in the from_cbor. 2020-11-27 22:40:27 +01:00
Karchnu a7eb538892 CBOR specs: a first bunch of tests, WIP. 2020-11-27 22:37:57 +01:00
Karchnu bdc14a1d20 use_cbor_discriminator: now works with imbricated classes. 2020-11-27 17:23:46 +01:00
Karchnu a058ab3ccf Decode simple value (Bool or Nil). 2020-11-26 17:05:22 +01:00
Karchnu 0c8baf1ccd UUID. 2020-11-26 06:52:12 +01:00
Karchnu 4d4948418d Time: allow to use String representations, as produced by #to_json. 2020-11-26 06:51:29 +01:00
Karchnu fef7d85349 Time added for CBOR::Any and CBOR::Encoder. 2020-11-25 23:35:18 +01:00
Karchnu 2be80d9692 Adding CBOR::Any. 2020-11-23 13:56:55 +01:00
Karchnu b8229f9dde Code simplification for writing JSON::Any values. 2020-11-23 13:55:40 +01:00
Karchnu 3d232e6005 Fixes read_value SimpleValueT parsing: finish_token! is now called. 2020-11-18 06:16:30 +01:00
Karchnu f45fb927f4 Write JSON::Any 2020-11-13 22:41:18 +01:00
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 94f47dd728 Removing "_ " in diagnostics, since map sizes are right this time. 2020-11-11 00:42:41 +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 21356c8bcf Release v0.2.1 2020-09-29 20:31:56 +02:00
Alberto Restifo e05b209ed3 Pass io to the encoder in to_cbor + regression test 2020-09-29 20:29:33 +02:00
Alberto Restifo 2e76c0b6d3 Upgrade to Crystal 0.35.0 2020-06-18 09:36:16 +02:00
Alberto Restifo d7a11f5b43 Adjust COSE tags terminology to match RFC8152 2020-06-18 09:29:29 +02:00
Alberto Restifo 529ec14773 Add changelog for v0.1.1 2020-06-02 12:55:49 +02:00
Alberto Restifo 2d6fedf749 Fix encoding of CBOR tags 2020-06-02 12:54:16 +02:00
Alberto Restifo 142263358e Remote WIP 2020-06-01 23:14:34 +02:00
Alberto Restifo 04c432c237 Prepare documentation for initial release 2020-06-01 23:12:05 +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
Alberto Restifo 59145cacfe Improve nil handling 2020-05-11 12:48:02 +02:00
Alberto Restifo 67db021c2b Fix boolean handling and add more tests 2020-05-11 12:00:17 +02:00
Alberto Restifo bc20176f77 Add some works to the dictionary 2020-05-09 20:27:53 +02:00
Alberto Restifo a769a1a17a Fix unbounded array iteration 2020-05-09 20:25:32 +02:00
Alberto Restifo dd73540da2 Adjust tag names 2020-05-09 11:08:44 +02:00
Alberto Restifo f2fc25f4d7 Add issue tracker link 2020-05-08 11:43:41 +02:00
Alberto Restifo 384f966116 Write contributing guidelines 2020-05-08 11:40:26 +02:00
Alberto Restifo 7fc53ab114 Add support for BigDecimal and BigInt 2020-05-08 11:40:18 +02:00
Alberto Restifo bb4d3e2b71 Remove duplicated bit shift 2020-05-03 13:43:23 +02:00
Alberto Restifo 332ca4af10 Provide support for half-precision floats 2020-05-03 13:39:06 +02:00
Alberto Restifo d0ee8df1af Port Float16 conversion from Rust 2020-04-25 23:45:03 +02:00
Alberto Restifo b1974aab2d Add BigInt 2020-04-25 18:35:07 +02:00
Alberto Restifo 41cc5f082b Fix union 2020-04-25 18:26:06 +02:00
Alberto Restifo 14c52208a3 Add named tuple support 2020-04-25 18:13:56 +02:00
Alberto Restifo fbf74630b2 Decode Tuples 2020-04-25 17:44:14 +02:00