Canonical data types

All values in the Canonical Data Format use standardised types. Each type has a main type and an optional sub type, formatted as mainType/subType.

The following table summarises commonly used types:

Data type Sub type Description Options
text plain Plain text length
  line Single line text  
  html HTML content  
number integer 32-bit integer  
  double Floating point (default)  
  decimal Decimal precision, scale
boolean   True/false  
date   ISO format date  
timestamp   ISO timestamp  
object object JSON object  
  array Array  
node   Reference to a node  
binding type Node reference + associated value  
list type List of items  

All values can be coerced and stringified. Additional sub types are allowed. The default type is text.

Data Type Script provides support for typed data. The node, binding and list formats are not currently implemented in the data type script but are implemented in Canonical export and import.