메인 콘텐츠로 건너뛰기

인수

table
Optional source table. 생략되거나 nil 이면 json.array 는 new empty array-marked table 을 반환합니다. 제공되면 1 with #source 의 numeric sequence entries 만 new table 로 복사됩니다.

반환값

table
JSON array marker 가 있는 new table 입니다. json.encode 는 이를 JSON array 로 serializes 합니다. original source table 은 반환되지 않습니다.

예제

json.encode 가 값을 JSON array 로 serializes 하도록 array-marked copy 를 만듭니다.