explicit non-specific-tag
Trans <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <e4e78130-fc0d-45b7-84e9-096244e6a1c9@v12g2000vby.googlegroups.com> |
Hi--
Section 6.28 in spec has:
# Assuming conventional resolution:
- "12"
- 12
- ! 12
Two questions.
1) What is this last seq element, the "explicit non-specific-tag",
supposed to resolve to?
The spec says: !<tag:yaml.org,2002:str> "12", but when I run this
through Ruby's Psych lib, which uses libyaml, it is coming back as
an !!int:
> YAML.load('- ! 12')
=> [12]
I think that might be right and spec wrong. But then:
> YAML.load('- ! "12"')
=> [12]
Is that right?
2) When MUST an explicit non-specific-tag be used?
I ask b/c I noticed libyaml is putting such a tag on every !!str node
that has characters that need to be escaped. As it seems to be
completely unnecessary, and make the output less human-readable, I do
not understand why it is being done.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey