2022年 7月
 123
45678910
11121314151617
18192021222324
25262728293031

近期发布

近期评论

    2022 年 7 月 4 日

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