ローカル参照と公開済みの全モードを含む完全パッケージをインストールします。
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 は 1 つのドット区切りパスを削除します。
書き込みは直ちに反映されます。-w <key> < <file> は別ファイルから値を読み、-d はパスを削除します。配列の要素を削除すると後続の添字が詰まります。
用意された例をページ上でそのまま実行できます。結果は事前に生成されてブラウザに表示され、サーバーではターミナルコマンドを実行しません。
現在の互換バージョンをインストールします。全機能は Base、縮小版は Minimum を選び、すでに導入済みのモジュール更新には upgrade を使います。
Base と Minimum は同じ現在のモジュールリリースの二つのパッケージです。
ローカル参照と公開済みの全モードを含む完全パッケージをインストールします。
install json縮小パッケージをインストールします。ローカルリファレンスは含まれず、
install json -mこの公開済みバージョンを正確に指定してインストールします。
install json -v 1.3.6upgrade が互換性を確認し、必要な場合だけブロックを置換します。
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
}
}