OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tosca message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: tosca.datatypes.json and tosca.datatypes.xml


These special types were introduced in TOSCA Simple Profile 1.2. Not much is said about them, but I am assuming that it is expected that parsers;
  1. Validate that the content is indeed proper JSON or XML
  2. Otherwise not change the data -- it should be left as a string (plain text)
This makes these types quite special indeed, because this kind of validation would have to be hardcoded in some way in the parser. There is no TOSCA constraint that could do that: unfortunately no simple regexp that could do the job. ;)

Because we are going to separate the Simple Profile from the grammar, I think we have to choose from the following options:
  1. Remove these types and implement this feature via a constraint. The "schema" constraint (section 3.6.3.2) seems like a good candidate, however from its description is seems like "schema" is intended to enhance these types, i.e. to add an XSD schema to "xml". Perhaps we can clarify and enhance this constraint: first argument would be "xml", "json", "yaml", etc., and the optional second argument would be the schema for that format.
  2. Move these types to be part of the grammar, just like "string", "map", "list", etc. (and of course remove the "tosca.datatypes." prefix from their names). I would also suggest that we might want to add a "yaml" type, for plain-text embedded YAML.
  3. Remove these types entirely: they can't be in the Simple Profile (not without special hardcoded parser support), and keeping them in the grammar will add unnecessary clutter.
I'm leaning on #1, if only because the "schema" constraint is totally unclear to me right now, and I do think this kind of validation mechanism could be useful.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]