Skip to main content

Đối số

string
bắt buộc
JSON string duoc parse truoc formatting. Function doc argument nay bang string type checking.
EncodeOptions
Optional encode options duoc dua vao re-encode step. json.format doc cung encode options nhu json.encode, sau do ep pretty thanh true.
DecodeOptions
Optional decode options duoc dung khi parsing input JSON. boolean dat useNull. table co the dat useNull va maxDepth.

Giá trị trả về

string
Readable formatted JSON string duoc tao sau parsing va re-encoding input.

Kiểu

EncodeOptions

Kiểm soát việc tuần tự hóa và định dạng JSON.

DecodeOptions

Kiểm soát hành vi phân tích cú pháp JSON.

Ví dụ

Parse existing JSON va re-encode thanh readable formatted JSON.