Re: Yayson (proposal for a YAML presentation embedded within JSON for browser clients)

William Spitzak <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Ingy dot Net wrote:

> Right. The serialization needs to be 100% JSON.

This means that any unquoted value in YAML, if the lack of quotes is 
used to determine the default tag, must be tagged in the conversion. 
What I am unclear on is when this is allowed, the YAML spec seems to 
skim over this but it certainly is using unquoted to distinguish the 
'null' from the 4-letter string "null".

> because space sorts before '!'. The first printable chars are:
> 
>      <space> ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
> 
> I was thinking it would be nice if the JSYNCisms key sorted above the 
> normal keys.

I think I see but that would require all bytes < '.' to be dot-prefixed 
and none above to require this. This would require all control 
characters and  double-quote to be dot-prefixed, despite the fact that 
they also need backslash escape for JSON. And '+' and '-' despite the 
fact that they are allowed in unquoted JSON. Also '(' would require it. 
And YAML has reserved '@' for future use so it seems that should require 
a dot.

So my feeling is that the short, but unfortunately non-contiguous set of 
"!%&*@" are the only special prefix characters.


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
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.