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: RE: [tosca] Clarification required for "!!timestamp" type in YAML


Hi Tal, just to make sure I understand your recommendation: youâre proposing to explicitly put quotes around timestamp values to make sure the YAML parser doesnât convert these into (language-specific) timestamp data structures, and instead make it the TOSCA parserâs responsibility to convert strings to timestamps.

 

Iâm fine with this proposal (especially since the TOSCA parser will have to provide this functionality anyway).

 

Chris

 

From: Tal Liron [mailto:tliron@redhat.com]
Sent: Monday, October 07, 2019 6:11 AM
To: Chris Lauwers
Cc: tosca@lists.oasis-open.org
Subject: Re: [tosca] Clarification required for "!!timestamp" type in YAML

 

On Sun, Oct 6, 2019 at 8:14 PM Chris Lauwers <lauwers@ubicity.com> wrote:

These are good comments, but unfortunately I think thatâs just how YAML works: parsers will try their best to determine the intended type of a value, and theyâre not always right.

 

If that's the case, I do recommend the following:

  1. We explicitly state that we accept both the timestamp type and strings.
  2. I think we should change all the examples in the spec to use either "!!timestamp" or to wrap it in strings, and that it should be the "good practice" that we decide to encourage. As for the good practice, I think it should be string: so, always wrap in quotes. This ensures that the TOSCA spec is the right one for timestamps and that we're not at the mercy of another spec, YAML. E.g. if the string is stored in a database, etc., we can refer to the TOSCA spec and not have to add another one.


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