Tests and documentation for CBOR Sequences (#46)
CBOR Sequences, RFC 8742, were always supported. This PR just adds documentation explaining how. It also adds regression tests.
diff --git a/inc/qcbor/qcbor_encode.h b/inc/qcbor/qcbor_encode.h
index 31fda52..46fa578 100644
--- a/inc/qcbor/qcbor_encode.h
+++ b/inc/qcbor/qcbor_encode.h
@@ -210,6 +210,13 @@
Note that when you nest arrays or maps in a map, the nested array or
map has a label.
+
+ Many CBOR-based protocols start with an array or map. This makes them
+ self-delimiting. No external length or end marker is needed to know
+ the end. It is also possible not start this way, in which case this
+ it is usually called a CBOR sequence which is described in [RFC 8742] (https://tools.ietf.org/html/rfc8742 ).
+ This encoder supports either just by whether the first item added is an
+ array, map or other.
@anchor Tags-Overview
Any CBOR data item can be tagged to add semantics, define a new data