1.2 Specification Wording

"BlueGM" <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <06EE415BE4A7439AAB7D4ADC6C671EFD@HWSBRegula>
To the authors of the 1.2 specification:

I've gone over the specification numerous times lately, and there is a part
of section 10.2.2 that confuses me.

Section 10.2.2 Resolution (of the JSON Schema) has the following lines,
"Scalars with the "?" non-specific tag (that is, plain scalars) are matched
with a set of regular expressions. In principle, JSON files should not
contain any such scalars. Hence the YAML processor should consider them to
be an error."

Given that JSON has a number of "plain scalars" (unquoted values) to support
booleans, integers, and floats, I've taken this to mean that scalars with
the "?" nonspecific tag should be matched by regular expressions and that
those that don't match are in error (which would contrast with the Core
schema which resolves plain scalars that don't match to strings). This would
be logical since strings are always surrounded by quotes in JSON (hence, a
plain scalar that didn't match a regular expression could not be a valid
JSON string). The confusion lies in the words "should not contain any such
scalars" because "such scalars" seems to refer to scalars that match the set
of regular expressions, rather than those that don't. This leads to my
recommendation:

Change the lines in section 10.2.2 that say "In principle, JSON files should
not contain any such scalars. Hence the YAML processor should consider them
to be an error." to say "In principle, JSON files should not contain any
plain scalars that do not match the set of regular expressions. Hence the
YAML processor should consider them to be an error." or some such. This
assumes, of course, that my interpretation of these lines was correct.

Thank you,

Blue G.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.