Goal Corriger les erreurs de formatage dans une réponse contenant un JSON mal structuré…
- User
Goal Corriger les erreurs de formatage dans une réponse contenant un JSON mal structuré afin de rendre le JSON exploitable et valide.
code1. Extraire et corriger uniquement la partie JSON de [[ { "recipeCode": "e67b8005e1eb4806b0855973fd1521b4", "updated": "2025-05-18T12:13:28.888Z", "title": "Beef YUKSU Broth", "subtitle": "", "description": "", "ingredients": [ { "section": "For the recipe", "ingredients": [ "beef brisket", "scallions or leeks", "garlic cloves", "water", "pepper (optional)." ] } ], "instructions": [ "Soak the whole meat in a large volume of water for 1 hour to remove the blood, then drain it.", "In a large pot, pour 4.5 liters of clear water and add the meat.", "Bring to a boil over high heat.", "Once boiling, reduce to medium-low heat and cook covered for 1 hour.", "Wash the scallions and peel the garlic cloves. If using leeks, cut them into large segments.", "Add the vegetables to the broth and continue cooking covered for an additional 30 minutes.", "Remove the meat then strain the broth.", "The meat can be sliced or shredded before being added to a dish." ], "notes_ingredients": "", "notes_instructions": "This versatile broth is the simplest of all and can be used in most hot or cold soups. For the latter, degrease it beforehand." } ]. 2. S'assurer que la syntaxe JSON est strictement valide. 3. Ne pas modifier les valeurs, seulement le format si nécessaire.
codeReturn Format Tu dois renvoyer un JSON strictement valide. - Respecte la structure originale du JSON (pas d'ajout, suppression ou modification des données). - Corrige les erreurs de formatage éventuelles (guillemets manquants, virgules, accolades, etc.). Warnings - Ne modifie pas le contenu des valeurs, seulement le format si nécessaire. - Ne renvoie que le JSON corrigé, sans explication. - Assure-toi que le JSON est bien formatté et exploitable. Context Dump Données à corriger : [[ { "recipeCode": "e67b8005e1eb4806b0855973fd1521b4", "updated": "2025-05-18T12:13:28.888Z", "title": "Beef YUKSU Broth", "subtitle": "", "description": "", "ingredients": [ { "section": "For the recipe", "ingredients": [ "beef brisket", "scallions or leeks", "garlic cloves", "water", "pepper (optional)." ] } ], "instructions": [ "Soak the whole meat in a large volume of water for 1 hour to remove the blood, then drain it.", "In a large pot, pour 4.5 liters of clear water and add the meat.", "Bring to a boil over high heat.", "Once boiling, reduce to medium-low heat and cook covered for 1 hour.", "Wash the scallions and peel the garlic cloves. If using leeks, cut them into large segments.", "Add the vegetables to the broth and continue cooking covered for an additional 30 minutes.", "Remove the meat then strain the broth.", "The meat can be sliced or shredded before being added to a dish." ], "notes_ingredients": "", "notes_instructions": "This versatile broth is the simplest of all and can be used in most hot or cold soups. For the latter, degrease it beforehand." } ]
- Assistantjson