Metadata datatype definition atom ('dtyp')
An atom you use to specify the data type of the metadata key atom’s value.
Overview
A metadata datatype definition atom can be used to specify the data type of the metadata key atom’s value. The type of the metadata datatype definition atom is ‘dtyp’.
The layout of a metadata datatype definition atom is as follows:
Data field | Bytes |
|---|---|
4 | |
Type = | 4 |
4 | |
variable |
The combination of datatype namespace and datatype array indicate the data type (or structure) of a metadata item value. The datatype namespace type indicates the interpretation of the datatype array value. This specification defines two datatype namespace types:
If
datatype namespaceis0,datatype arraycontains a big-endian 32-bit unsigned integer corresponding to a well-known type specified in Well-known types. For example, a well-known type of1indicates UTF-8 text and23indicates a big-endian 32-bit floating-point number.If
datatype namespaceis1,datatype arraycontains a reverse-address style UTF-8 string indicating an extended data type. This data type namespace type can be used if the data type does not have a corresponding well-known data type.Datatype arrayconsists of the bytes of a case-sensitive UTF-8 string without a null (‘\0’) terminator. For example, a hypotheticaldatatype array“com.company.my-custom-datatype” could register a custom data type belonging to the owner of the DNS registration “mycompany.com”.
A datatype namespace other than 0 or 1 may occur in a timed metadata track, perhaps written according to a later version of this specification. Metadata item values with unrecognized data types should be ignored. Even so, some processing is still possible on the metadata item with unrecognized data type, such as copying it between tracks.