Closed istathar closed 6 years ago
From a quick scan through the CBOR spec, it looks like it would work as-is (more or less) for a subset of CBOR. The complication would be for types that are not naturally key/value pairs like the encoding used by Protocol Buffers. Do you have any thoughts on the matter?
@NathanHowell from what I can see, Duncan's work is heavily focused on serializing Haskell data types in a custom way, ie, some tags for which constructor in a type was used, etc. But CBOR by itself seems pretty awesome at short numbers, etc; ie, it exposes the wire encoding which was an implementation detail in protobuf. Anyway, just food for thought.
AfC
Off topic: do you think the approach used in this library would be suitable for managing describing formats to be encoded with CBOR? If you look at Duncan et al's work on a new binary using cbor in the back-end binary-serialize-cbor they mention that no work has been done on specifying arbitrary formats. Could your type description techniques be used?