Skip to content

Commit ffa0271

Browse files
committed
add Snippet demonstrating encoding arrays
1 parent 633b4bd commit ffa0271

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Snippets/EncodingArrays.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import JSON
2+
3+
let json:JSON = .array
4+
{
5+
for i:Int in 0 ... 3
6+
{
7+
$0[+] = [_].init(0 ... i)
8+
}
9+
}
10+
11+
print(json)

0 commit comments

Comments
 (0)