read

fun read(tree: Map<*, *>, warn: (String) -> Unit): Manifest

Reads tree, the JSON object of a Manifest; fails on a missing field, another Manifest.FORMAT, a marker of requires this reader does not understand (ManifestFeatures) on the Manifest, a context or an aggregate (the whole read is refused, naming where the marker stands), a context whose name breaks ContextName, a context name listed twice, an aggregate name listed twice in one context, or an access attribute whose name breaks AccessAttributeName. A name is an entry's identity (its routes, its topics, its generated code), so a reader never takes one of two entries of a name for the other.

A value it does not know of an enumeration, which a newer writer may have added, leaves out what it belongs to, told to warn: a command of an unknown creation, an aggregate of an unknown ownership, idSource or access attribute type, a subscription of an unknown kind, function kind (a built-in one too), start, or job scope or misfire, an error entry of an unknown retry. Each of them decides behaviour (how a command routes, whom an aggregate is scoped to and who may see it, how a subscription runs, whether a caller sends again), so a reader never guesses it: it reads what it understands and leaves out what it does not. A reader has then no entry of that error code, as of a code no Manifest declares: what a retry may do it takes from the problem itself, which carries its own retry. No enumeration of the format is merely descriptive. Each caller says what is done with what is left out: a peer's Manifest logs it, and one never newer than its reader passes REFUSE.