2021-06-28
A collection type may leave the item type unspecified. Items must then be type tagged.
Homobenous array types specify only one primitive item type. c arrays are like this.
Records are arrays with fixed item count and separately specified types for each item. Byte count may vary.
person { name uint8[]
shoe-size uint8}A semantic type called Boolean has a structural type uint8.
A semantic type called Person has a structural type record [uint8[], uint8]. The semantic type describes in human readable way what the values mean.
Semantic type consist of multilingual labels and descriptions. Semantic types can define constraints on the values. For example boolean can only have values 1 and 0. Constrains may be expressed in WASM.
Two separate semantic types may have the same structural type.
int8 uint8 int16 uint16 float16 float32 uvlq vlq{uint8 uint16 {uint8}}[uint8][uint8 3]Should tuples be open for extension in that the data may have more items than in the type definition? Since the fields do not have names they are identified by their position. A record would have named fields. A dictionary has named opitonal fields.
Protobuf has out of band types. Json, xml and fressian have in band structural types.
Json and xml schemas define out of band semantic types.
This site is generated with zetgen