JSON路径提取器
使用JSONPath表达式从JSON对象中提取值。非常适合从复杂的嵌套JSON结构、API响应和配置文件中提取特定数据。
API 文档
请求端点
POST /zh/api/tools/json-path-extractor
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| jsonInput | textarea | 是 | - |
| jsonPaths | textarea | 否 | JSONPath表达式用于提取值。示例: $.* - 所有值 $.users[*].name - 所有用户名 $.data.items[*].price - 所有物品价格 留空则提取所有值 |
| outputFormat | select | 是 | - |
| includePaths | checkbox | 否 | 包含每个提取值的完整路径 |
| flattenArrays | checkbox | 否 | 将提取的数组扁平化为单个值 |
| preserveOrder | checkbox | 否 | 保持JSON中值的原始顺序 |
| nullValues | checkbox | 否 | 在提取结果中包含null值 |
响应格式
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
文本:
文本
AI MCP 文档
将此工具添加到您的 MCP 服务器配置中:
{
"mcpServers": {
"elysiatools-json-path-extractor": {
"name": "json-path-extractor",
"description": "使用JSONPath表达式从JSON对象中提取值。非常适合从复杂的嵌套JSON结构、API响应和配置文件中提取特定数据。",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=json-path-extractor",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。
如果遇见问题,请联系我们:[email protected]