Data Processing
JSON Flattener
Flatten nested JSON objects into key-value pairs with customizable delimiters and flattening strategies
json· Resultado JSONAbrir ferramenta
Início rápido
Chame esta ferramenta a partir do seu código em três idiomas.
cURL
curl -X POST 'https://api.elysiatools.com/pt/api/tools/json-flattener' \
-H 'Content-Type: application/json' \
-d '{"jsonInput":"{\n \"user\": {\n \"name\": \"John\",\n \"details\": {\n \"age\": 30,\n \"city\": \"New York\"\n }\n },\n \"settings\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n}","strategy":"nested","delimiter":".","maxDepth":0,"includeArrays":true,"filterNulls":false,"preserveOrder":true,"sortKeys":"none"}'Referência da API
Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
Endpoint
HTTP
POST https://api.elysiatools.com/pt/api/tools/json-flattenerParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| jsonInput | textarea | Sim | — |
| strategy | select | Sim | — |
| delimiter | text | Não | — |
| maxDepth | number | Não | — |
| includeArrays | checkbox | Não | — |
| filterNulls |
Integração MCP
Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Configuração do servidor
Adicione este bloco à configuração do seu cliente MCP:
mcp.json
{
"mcpServers": {
"elysiatools-json-flattener": {
"name": "json-flattener",
"description": "Flatten nested JSON objects into key-value pairs with customizable delimiters and flattening strategies",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=json-flattener",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Listar ferramentas disponíveis
Após conectar ao endpoint SSE, liste as ferramentas expostas:
tools/list
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Chamar esta ferramenta
Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus parâmetros:
tools/call
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "json-flattener",
"arguments": {
"jsonInput": "{\n \"user\": {\n \"name\": \"John\",\n \"details\": {\n \"age\": 30,\n \"city\": \"New York\"\n }\n },\n \"settings\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n}",
"strategy": "nested",
"delimiter": ".",
"maxDepth": 0,
"includeArrays": true,
"filterNulls": false,
"preserveOrder": true,
"sortKeys": "none"
}
}
}Encadeie várias ferramentas em uma sessão com uma lista toolId separada por vírgulas, p. ex. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (máx. 20).