json数据:一种轻量级的标准数据的交换格式

各种语言数据传输的一种格式

        let s = '[1, 2, 3, 4]';
        let f = JSON.parse(s);
        //反序列化
        console.log(f, typeof f);

        let s1 = ['a', 'b', 'c'];
        let f1 = JSON.stringify(s1);
    //    序列化
        console.log( f1, typeof f1);

 

相关文章:

  • 2021-12-31
  • 2021-08-28
  • 2021-08-30
  • 2022-01-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-01
  • 2021-08-23
  • 2022-12-23
  • 2021-07-28
  • 2021-07-13
  • 2021-04-30
相关资源
相似解决方案