PowerJSON 是由 JSON 改进的数据交换格式。
:clap: Powerjson 是由 JSON 改进而成的数据交换格式,它将 JSON 支持了部分 JavaScript 语法,使其更加高效可用,并且解决了许多 JSON 历史遗留下来的问题。
它支持 单引号字符串, 多行字符串, 注释, 运算符, 导入文件, 导入其它 PJSON 文件 等。
{ // 字符串 helloText: 'hello world', MultiLineText: ` Welcome to PowerJSON! `, // 文件和导入 myFile: new File('./file.txt'), importPJSONFile: new PJSON('./index2.pjson'), getFile: new GET('http://cn.powerjson.org'), // 运算符 tenDaySeconds: 60 * 60 * 24 * 10 // 这里是注释! /* 注释2 */ }
PowerJSON 在 Gitee / 兼容性
访问 教程!