PowerJSON
Powerjson is improved by the JSON data interchange format made, it will be JSON support some JavaScript syntax to make it more efficient and available, JSON and solves many problems left over from history.
It supports single quoted string , multi-line character string , the comment , operators , import file , import other file PJSON like.
Simple Demo
{
// 字符串
helloText: 'hello world',
MultiLineText: `
Welcome
to
PowerJSON!
`,
// 文件和导入
myFile: new File('./file.txt'),
importPJSONFile: new PJSON('./index2.pjson'),
getFile: new GET('http://www.powerjson.org'),
// 运算符
tenDaySeconds: 60 * 60 * 24 * 10
// 这里是注释!
/* 注释2 */
}
compatibility
PowerJSON supports all compatible ES6 the browser / js runtime .
Browser:
- IE >= 11
- Edge All
- Firefox >= 6
- Chrome >= 21
- Safari >= 7.1
- Opera> = 15
Node.js:
- Nodejs >= 6