Tag             27
   Data Item       array [typename, constructargs...]
   Semantics       Serialised language-independent object with type name and constructor arguments
   Contact         Marc A. Lehmann <>


The generic-object tag in CBOR can be used to serialise complex objects in CBOR. It is meant to exchange complex datatypes that are not tied to a specific language or implementation, between CBOR implementations that use different internal representations. It is quite similar to CBOR tags themselves, the main difference being that the tag namespace is not numeric but a string, providing easier extensibility than CBOR tags, making automatic type mapping to CBOR possible and improving the self-documenting nature of these objects.

There are no rules that specify how to serialise or deserialise objects using this tag - sender and receiver need to agree on how to handle these tags when they want to understand their semantics. Receivers can always opt to handle them like any other unknown tag.

The typename is usually a class name, or another string that indicates the name of the type. It is suggested, but not required, to prefix the typename with a language name or other identifiying string, and a slash. Additional array members are determined by the data type.


   27(["ISO/8601", "2013-11-16"])
   27(["AmountDue", 100, "EUR"])
   27(["C/wchar_t", 71626272])