Fonction BeauJSON  [Format données (XML, JSON, ...) : JSON]

Syntaxe

BeauJSON(< JSON > [, < Texte Indentation >])

  • < JSON > : Texte JSON.
  • < Texte Indentation > : Texte qui sert d'indentation, par défaut TAB (A partir de la 2644)

Description

Indente et met les retours à la ligne pour un meilleur affichage d'un JSON

Exemple

Formule

JSON Résultat

BeauJSON({

{

  "squadName": "Super hero squad",

  "homeTown": "Metro City",

  "formed": 2016,

  "secretBase": "Super tower",

  "active": true,

  "members": [

    {

      "name": "Molecule Man",

      "age": 29,

      "secretIdentity": "Dan Jukes",

      "powers": ["Radiation resistance", "Turning tiny", "Radiation blast"]

    },

    {

      "name": "Madame Uppercut",

      "age": 39,

      "secretIdentity": "Jane Wilson",

      "powers": [

        "Million tonne punch",

        "Damage resistance",

        "Superhuman reflexes"

      ]

    }

  ]

}

)

{

        "squadName": "Super hero squad",

        "homeTown": "Metro City",

        "formed": 2016,

        "secretBase": "Super tower",

        "active": true,

        "members": [

               {

                       "name": "Molecule Man",

                       "age": 29,

                       "secretIdentity": "Dan Jukes",

                       "powers": [

                               "Radiation resistance",

                               "Turning tiny",

                               "Radiation blast"

                       ]

               },

               {

                       "name": "Madame Uppercut",

                       "age": 39,

                       "secretIdentity": "Jane Wilson",

                       "powers": [

                               "Million tonne punch",

                               "Damage resistance",

                               "Superhuman reflexes"

                       ]

               }

        ]

}