Skip to main content

Argumenty

string
wymagane
JSON string parsowany przed formatting. Function czyta ten argument przez string type checking.
EncodeOptions
Optional encode options przekazywane do re-encode step. json.format czyta te same encode options co json.encode, a potem wymusza pretty na true.
DecodeOptions
Optional decode options uzywane podczas parsing input JSON. boolean ustawia useNull. table moze ustawic useNull i maxDepth.

Zwroty

string
Readable formatted JSON string utworzony po parsing i re-encoding input.

Typy

EncodeOptions

Kontroluje serializację i formatowanie JSON.

DecodeOptions

Kontroluje zachowanie analizy JSON.

Przykład

Parse existing JSON i re-encode jako readable formatted JSON.