Skip to main content

Arguments

string
requis
JSON string a parse avant le formatting. L’function lit cet argument avec string type checking.
EncodeOptions
Optional encode options passees au re-encode step. json.format lit les memes encode options que json.encode, puis force pretty a true.
DecodeOptions
Optional decode options utilisees pendant le parsing de l’input JSON. Un boolean definit useNull. Une table peut definir useNull et maxDepth.

Retours

string
Readable formatted JSON string produit apres parsing et re-encoding de l’input.

Types

EncodeOptions

Contrôle la sérialisation et le formatage JSON.

DecodeOptions

Contrôle le comportement d’analyse JSON.

Exemple

Parse existing JSON puis re-encode en readable formatted JSON.