Neusofts

科技改变生活,创新引领未来!

json3

JSON 3 is a modern JSON implementation compatible with a variety of JavaScript platforms, including Internet Explorer 6, Opera 7, Safari 2, and Netscape 6.

Website:http://bestiejs.github.com/json3

Example:

Code:

var r = document.getElementById('results')
r.innerHTML = JSON.stringify({"Hello": 123});
r.innerHTML+='<br />'

JSON.parse("[[1, 2], 1, 2]", function (key, value) {
  if (typeof value == "number") {
    value = value % 2 ? "Odd" : "Even";
    value += '<br />';
  }
  r.innerHTML+= value;
});

Result:

{“Hello”:123}
Even
Odd
Even
Odd
,,,

———— End ————