Format Conversion
Convert various text formats to JSON with customizable parsing options
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/text-to-json' \
-H 'Content-Type: application/json' \
-d '{"textInput":"Enter your text data to convert to JSON:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, INI format, etc...","inputFormat":"auto","delimiter":"Custom delimiter (e.g., |, ;, \\t)","outputType":"array","rootKey":"Root object key (optional)","arrayMode":false,"trimValues":true,"skipEmptyLines":true,"prettyPrint":true,"includeStats":false}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/text-to-json| Nom | Type | Requis | Description |
|---|---|---|---|
| textInput | textarea | Oui | — |
| inputFormat | select | Oui | — |
| delimiter | text | Non | — |
| outputType | select | Oui | — |
| rootKey | text | Non | — |
| arrayMode |
Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-text-to-json": {
"name": "text-to-json",
"description": "Convert various text formats to JSON with customizable parsing options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-json",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "text-to-json",
"arguments": {
"textInput": "Enter your text data to convert to JSON:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, INI format, etc...",
"inputFormat": "auto",
"delimiter": "Custom delimiter (e.g., |, ;, \\t)",
"outputType": "array",
"rootKey": "Root object key (optional)",
"arrayMode": false,
"trimValues": true,
"skipEmptyLines": true,
"prettyPrint": true,
"includeStats": false
}
}
}| checkbox |
| Non |
| — |
| trimValues | checkbox | Non | — |
| skipEmptyLines | checkbox | Non | — |
| prettyPrint | checkbox | Non | — |
| includeStats | checkbox | Non | — |
Résultat JSON
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Des questions ou un problème ? Contactez [email protected]