15.09.2014 Views

JSON

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>JSON</strong>T<br />

var rules = {<br />

self:<br />

'',<br />

closed: function (x) {return x ? 'polygon' : 'polyline';},<br />

'points[*][*]': '{$} '<br />

};<br />

var data = {<br />

"color": "blue",<br />

"closed": true,<br />

"points": [[10,10], [20,10], [20,20], [10,20]]<br />

};<br />

jsonT(data, rules)<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!