Skip to main content

인수

string
필수
Formatting 전에 parse되는 JSON string입니다. function은 이 argument를 string type checking으로 읽습니다.
EncodeOptions
Re-encode step에 전달되는 optional encode options입니다. json.format은 json.encode와 같은 encode options를 읽은 뒤 pretty를 true로 강제합니다.
DecodeOptions
Input JSON parsing 중 사용하는 optional decode options입니다. boolean은 useNull을 설정합니다. table은 useNull과 maxDepth를 설정할 수 있습니다.

반환값

string
Input을 parsing 및 re-encoding한 뒤 생성되는 readable formatted JSON string입니다.

타입

EncodeOptions

JSON 직렬화 및 형식화를 제어합니다.

DecodeOptions

JSON 구문 분석 동작을 제어합니다.

예제

Existing JSON을 parse한 뒤 readable formatted JSON으로 re-encode합니다.