annotate samples/json.tp @ 278:1205c7a43cb4
Add bindings for SDL_ClearError, SDL_GetError, SDL_LoadBMP, SDL_CreateTextureFromSurface and a partial binding for SDL_RendererCopy
author |
Michael Pavone <pavone@retrodev.com> |
date |
Mon, 21 Jul 2014 12:51:38 -0700 |
parents |
6e579a75a0a9 |
children |
|
rev |
line source |
154
|
1 #{
|
|
2 main <- {
|
|
3 arr <- json decode: "[\"foo\", \"bar\", 13245, \"baz\" ]"
|
|
4 foreach: arr :idx val {
|
|
5 print: (string: idx) . ": " . (string: val) . "\n"
|
|
6 }
|
|
7 obj <- json decode: "{\"foo\": \"bar\", \"baz\": \"qux\", \"meaningOfLife\": 42 }"
|
|
8 foreach: obj :idx val {
|
|
9 print: (string: idx) . ": " . (string: val) . "\n"
|
|
10 }
|
|
11 }
|
|
12 }
|