安装包含本地参考和全部已发布模式的完整包。
install jsonjson命令操作的是结构而不是文本片段。limits.history 定位一个嵌套节点,-w 修改该路径,: 后的合法 null、数组或对象类型。
json <file> [key|options] · json dump <file>json <file>显示
json <file> <key>显示一个精确的点路径
json dump <file>显示规范化的
-f <text|mask> [-k|-v]在键或值中查找匹配项;* 和 ? 表示掩码
-w <key> : <value>直接把值写入文件
-w <key> < <file>写入从另一个文件读取的值
-d <key>按点路径删除值
-c验证
在当前 core 中,成功打开的文件会立即可通过 $ 再次引用。如果此模块是该扩展名已安装的最高优先级处理器,只输入文件名即可由此命令打开。这些是 core 提供的便捷机制;
-f 同时搜索路径和值。仅搜索键时加 -k,仅搜索值时加 -v。包含 * 或 ? 的查询按掩码处理。
-w 会立即写入文件。: 后直接给出值;< <file> 从另一个文件读取值。-d 删除一个点路径。
写入立即生效;-w <key> < <file> 从文件读取值,-d 删除指定路径。删除数组元素后,后续数字索引会前移。
可直接在页面中运行预先准备的示例。结果已预先生成并在浏览器中显示;服务器不会执行任何终端命令。
安装当前兼容版本。完整功能请选择 Base,精简包请选择 Minimum;已安装模块的更新请使用 upgrade。
Base 与 Minimum 是同一当前模块版本的两个包。
安装包含本地参考和全部已发布模式的完整包。
install json安装精简包。该包不包含本地参考;
install json -m安装这个确切的已发布版本。
install json -v 1.3.6让 upgrade 检查兼容性,仅在需要时替换已安装块。
upgrade json删除扩展块,不影响核心和其他模块。
install json -u示例可复制,但网站不会执行。请先检查路径、权限和破坏性选项。
cd \sandbox\config | json app.jsonname lil-sandbox
debug true
features.0 files
features.1 code
features.2 archives
limits.upload_mb 2
limits.history 25cd \sandbox\config | app.jsonname lil-sandbox
debug true
features.0 files
features.1 code
features.2 archives
limits.upload_mb 2
limits.history 25json config/app.json limits.history25json config/app.json features.1codejson config/app.json -f "upload" -klimits.upload_mb 2json config/app.json -f "files" -vfeatures.0 filesjson config/app.json -f "limits.*"limits.upload_mb 2
limits.history 25json config/app.json -w limits.history : 30limits.history 30json config/app.json -w limits.policy < config/value.jsonlimits.policy {"rotate":true,"attempts":5}json config/app.json -w features.1 : "editor"features.1 editorjson config/app.json -d features.1name lil-sandbox
debug true
features.0 files
features.1 archives
limits.upload_mb 2
limits.history 25json config/app.json -cValid JSONjson dump config/app.json{
"name": "lil-sandbox",
"debug": true,
"features": [
"files",
"code",
"archives"
],
"limits": {
"upload_mb": 2,
"history": 25
}
}
json config/app.json unknown.keyPath not foundjson config/invalid.json -cInvalid JSONjson config/missing.jsonFile not foundjson config/app.json -w limits.historyValue required after : or sandbox/config/app.json该示例使用受保护的 /sandbox/ 文档工作区中的文件或目录。
{
"name": "lil-sandbox",
"debug": true,
"features": ["files", "code", "archives"],
"limits": {
"upload_mb": 2,
"history": 25
}
}