json-transformer
轉換和操作 JSON 資料
JSON 資料通常以複雜的巢狀結構呈現,難以處理。此技能提供專業指導,適用於任何使用場景下的 JSON 解析、轉換、驗證和轉換。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「json-transformer」。 Convert this user data to CSV format: [{"name": "Alice", "role": "admin"}, {"name": "Bob", "role": "user"}]
預期結果:
- name,role
- Alice,admin
- Bob,user
正在使用「json-transformer」。 Extract all email addresses from users over age 25
預期結果:
- john@example.com
- jane@example.com
正在使用「json-transformer」。 Deep merge base config with override
預期結果:
- theme: dark
- language: en (overridden)
- api_key: [from base]
安全審計
安全Pure documentation skill containing only markdown guidance for JSON transformation. Static findings are false positives - scanner misidentified JSON serialization (json.dumps) as cryptographic algorithms, markdown code formatting backticks as shell execution, and config validation placeholders as credential access. No executable code, network access, or file system operations exist in this skill.
風險因素
🌐 網路存取 (1)
⚙️ 外部命令 (68)
📁 檔案系統存取 (13)
🔑 環境變數 (1)
品質評分
你能建構什麼
API 回應轉換
將複雜的 API 回應轉換為簡潔的應用程式可用格式
資料管線轉換
在資料管線工作流程中將 JSON 與其他格式相互轉換
組態檔案管理
合併和驗證跨環境的組態檔案
試試這些提示
解析並美化此 JSON 資料,然後識別任何格式問題並建議修復方法。
使用 JSONPath 語法從此資料結構中擷取所有 25 歲以上使用者的電子郵件地址。
將此 JSON 陣列轉換為 CSV 格式,並加入適當的標題以用於試算表匯入。
深度合併這兩個組態檔案,並顯示哪些值被覆蓋。
最佳實務
- 在執行轉換之前務必驗證 JSON 結構
- 對於複雜的資料擷取查詢使用 JSONPath 或 JMESPath
- 在套用到正式環境之前先在範例資料上測試轉換
避免
- 手動編輯深度巢狀的 JSON 而非使用轉換函數
- 合併組態檔案時跳過驗證
- 在未先扁平化巢狀結構的情況下將大型 JSON 檔案轉換為 CSV