Data structure validation commands are grouped in so-called map of schemas. Map's key is schema name. Schema's value is a list of commands. Each command is a list of string-encoded words (with several exceptions). First element of the command's list is a command name. Possible following elements are command-specific. Here is full list of structure validation commands, that should be generated from higher level schema descriptions. TAKE | [".", k] Take/choose/consider element "k". All following commands will be applied to the taken value. If "k" is NIL, then choose the element your scheme is currently in. If "k" is an integer, then choose the k-th value in a list, starting from the zero. If "k" is a string, then choose the value of the "k" key in the map. By default analogue of [".", NIL] command is executed when schema check is called. EXISTS | ["E"] Assure that chosen element exists. !EXISTS | ["!E"] Assure that chosen element does not exist. EACH | ["*"] Execute the next command against every element of the chosen (if it exists) list, or every value of the map. TYPE | ["T", T0 [, T1, ...]] Check that chosen (if it exists) element's type is in (T0, T1 ...) set. Possible single-character types are: "B"(IN) (BL)"O"(B) "b"OOL "H"(EXLET) "I"(NT) "L"(IST) "K"(EKS) MAGIC "M"(AP) "N"(IL) "S"(TR) "T"(AI) GT | [">", n] Check that chosen (if it exists) integer value is greater than "n". If chosen value is either list or map, then check their length. If the value is a string, then check its length. LT | ["<", n] Same as ">", but check that value is less than "n". SCHEMA | ["S", s] Check chosen (if it exists) element against schema named "s". TIMEPREC | ["TP", p] Check that chosen (if it exists) element, of time type, has value of maximal specified time precision. "p" is integer with following possible values: 0: only full seconds allowed, no parts; 3: only up to milliseconds; 6: only up to microseconds; 9: only up to nanoseconds; 12: only up to picoseconds; 15: only up to femtoseconds; 18: up to attoseconds; UTC | ["UTC"] Check that chosen (if it exists) element, of TAI type, can be converted to UTC. EQ | ["=", v] Check that chosen (if it exists) element's value equals to binary string "v". => CDDL For example let's check "our" structure, described in CDDL as: ai = text .gt 0 fpr = bytes .size 32 our = {a: ai, v: bytes/text, fpr: fpr, ?comment: text} "a", "v", "fpr" fields are required ones. "v" has two allowable types. "comment" is optional, but typed. And "fpr" has fixed length. Corresponding schema can be: {"our": [ ["T", "M"], [".", "a"], ["E"], ["T", "S"], [">", 0], [".", "v"], ["E"], ["T", "B", "S"], [".", "fpr"], ["E"], ["T", "B"], [">", 31], ["<", 33], [".", "comment"], ["T", "S"], ]} Here is an example with multiple schemas: latitude = -90..90 longitude = -180..180 where = [latitude, longitude] wheres = [+ where] { "where": [ ["T", "L"], [">", 1], ["<", 3], ["*"], ["T", "I"], [".", 0], [">", -91], ["<", 91], [".", 1], [">", -181], ["<", 181], ], "wheres": [ ["T", "L"], [">", 0], ["*"], ["S", "where"], ], }