Re: JSYNC
Brad Baxter <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 30, 2010 at 2:36 PM, Ingy dot Net <[email protected]> wrote: > > On Sat, May 1, 2010 at 12:21 AM, William Spitzak <[email protected]> wrote: >> >> Brad Baxter wrote: >>> >>> I, for one, would welcome this. >>> >>> Forgive me for spotting trivia, but the lines >>> below don't seem to match. Is that just a typo, >>> or is there something significant I'm missing. >>> >>> "notes": ".!!! Awesome !!!", >>> "notes": ".... add note here ...", >>> >>> notes: '!!! Awesome !!!' >>> notes: ... add note here ... >> >> He is using a leading dot to quote the next character. Otherwise it would >> be impossible to make a tag that starts with '!' or '&'. >> I suspect my understanding is shallow and logic flawed, but I'm not sure why the string would need escaping if yaml would understand it. For example, the above ought to be just "notes": "'!!! Awesome !!!'", "notes": "... add note here ...", because yaml would understand them, and ... > Note that the escape char is the leading char, *after* extra syntax is > removed. > > [ "!type .&content" ] > > is: > > --- !type '&content' ... the above could be [ "!type '&content'" ] I suppose this could also work [ "!type \"&content\"" ] but I'm not sure it would ever be needed if JSON's character notations (vs. YAML's double-quoted ones) are sufficient. As an escape mechanism, I would find single quotes much easier to spot. See original caveat. :-) -- Brad ------------------------------------------------------------------------------