JSON 替代 λJSON

码农软件 · 软件分类 · JSON/BSON开发包 · 2019-03-31 06:57:02

软件介绍

λJSON 是 JSON 的嵌入式替代品,可以让你解析和字符串化纯函数及其内容

示例代码:

var LJSON = require("LJSON");// `newPlayer` is a function and couldn't be serialized with JSON.function newPlayer(name){    return {
        name      : name,
        hp        : 12,
        atk       : 5,
        def       : 5,
        inventory : []}
};
// LJSON has no trouble doing it because `newPlayer` is pure.
var newPlayerSource = LJSON.stringify(newPlayer); 
var John            = LJSON.parse(newPlayerSource)("John");console.log("Serialized λJSON: " + newPlayerSource);console.log("Parsed and applied: " + John);

本文地址:https://codercto.com/soft/d/2527.html

编程珠玑(第二版)

编程珠玑(第二版)

[美] Jon Bentley / 谢君英、石朝江 / 中国电力出版社 / 2004-4 / 28.00元

《编程珠玑(第2版)》是计算机科学方面的经典名著。书的内容围绕程序设计人员面对的一系列实际问题展开。作者Jon Bentley 以其独有的洞察力和创造力,引导读者理解这些问题并学会解决方法,而这些正是程序员实际编程生涯中至关重要的。一起来看看 《编程珠玑(第二版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具