Re: JSYNC
William Spitzak <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Ingy dot Net wrote: > The base encoding is not yaml, it's json. I need to repurpose strings > that begin with a ! & or *. So in the rare case that an actual json > string begins with one of those, I need to escape it. I do that by > putting a '.' in front. Then I make the rule that in JSYNC, a '.' at the > start of a string is removed. Therefore I need to encode the string > '...' as "....". That's a simple rule. I could make things more > complicated by saying I only remove a leading '.' if it comes before a ! > & or *, but that seems a little too precious to me. Making the '.' do quoting if only in front of a character that needs quoting makes sense, and would fix the problem I am worried about with numbers, since ".1" would be unchanged. It does mean the set of characters to quote has to be defined, but it looks like "&*.@" might be enough. ------------------------------------------------------------------------------