3 ms·
Here's a link that illustrates this concept: http://seanmcgrath.blogspot.com/2007/01/mixed-content-trying-to-understand-json.html http://seanmcgrath.blogspot.c
by mturmon 16y ago
Here's a link that illustrates this concept:
http://seanmcgrath.blogspot.com/2007/01/mixed-content-trying-to-understand-json.html http://seanmcgrath.blogspot.com/2007/01/mixed-content-trying...
It's not as persuasive as it could be, but it gets the idea across.
- Groxx 16y agoOnly partially. Take a look at DOM interpretations for HTML's flavor of XML: that sort of [b][text]a word[/text][/b] markup is precisely what it interprets [b]a word[/b] as. Because that's what it means. And in any case, in order to handle truly inline content you've still got to correctly detect such in-line code, and label it as separate from regular text which just looks like inline code. Which means escaping. Which means "text {b:'bold text'} more text" is the same solution, with the same problems. >Here is XML's sweet spot (using square brackets to keep everything un-mungable by the angle-bracket chewers in my current tool chain): Sweet spot, in that parsers usually just assume everything which looks like code is code, even when the spec allows for other ways, forcing people to fake it with things like square brackets. edit: whups. Editors, not parsers, are primarily responsible for such mangling, by making it hard to insert code-as-text. The problem with inline markup still exists, however.