Hi! On Fri, Nov 11, 2011 at 08:34, Diego Bosc? <yampeku at gmail.com> wrote: > Although this would work, I think that it would make ADL far less > readable
Some readability thoughts... When a value (e.g. upper bound) may be either a number or a symbol (* or infinity) most recieveing software will need to have logic separating the cases anyway, no matter how they are serialized. So then I wonder how much harder it would be to include string parsing logic so that we can have JSON-fields with string values like... "occurrences": "1..*" Will a string pattern be good enough for validation by auto-generated validators or does separation into fields clearly make auto-generated validators more capable in this case? Archetypes and templates will likely often be re-used as in-memory objects anyway so a little bit of string parsing overhead at startup might not have any significant overhead cost. On the other hand if we want to be verbose we could re-use some of the formalisms from http://json-schema.org/ Then we get schema validators in many programming languages for free (http://json-schema.org/implementations.html). Or perhaps json-schema should be an output format from something similar to the TDS (template data schema) approach? Best regards, Erik Sundvall erik.sundvall at liu.se http://www.imt.liu.se/~erisu/? Tel: +46-13-286733

