Skip to content

Instantly share code, notes, and snippets.

@klavs
Last active February 5, 2016 14:54
Show Gist options
  • Save klavs/004987c9b9b538c53eb3 to your computer and use it in GitHub Desktop.
Save klavs/004987c9b9b538c53eb3 to your computer and use it in GitHub Desktop.

Simple example

html

<div class="warning">You <em>must not</em> fail!</div>

xml

<div class="warning">
	You
	<em>must not</em>
	fail!
</div>

aml

<div class="warning">
	"You"
	<em>"must not"</em>
	"fail!"
</div>

json

{
	"name": "div",
	"props": {
		"class": "warning"
	},
	"children": [
		"You",
		{
			"name": "em",
			"children": ["must not"]
		},
		"fail!"
	]
}

Char escape

html & xml

<span>You &amp; I: "magic &lt;&gt;"</span>

aml

<span>"You & I: \"magic <>\""</span>

json

{
	"name": "span",
	"children": ["You & I: \"magic <>\""]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment