On Tue, Jun 15, 2010 at 9:48 AM, William Spitzak <spitzak@rhythm.com> wrote:
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".

Right, this is called "implicit typing" in YAML. Implicitly typing on quoted strings may be forced in YAML by using a single !.

number: ! "42"

I think we can do the same for JSYNC.

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.

You are probably right. Let's start with that set.

Cheers, Ingy