2022年 12月
 1234
567891011
12131415161718
19202122232425
262728293031  

近期发布

近期评论

    2022 年 12 月 8 日

    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
    ,,,