comparison modules/json.tp @ 272:bb2b4613fdc8

Added support for encoding integers and booleans as JSON
author Michael Pavone <pavone@retrodev.com>
date Sat, 19 Jul 2014 20:18:34 -0700
parents bb4723fec05e
children ddf38b66b2e2
comparison
equal deleted inserted replaced
271:bb4723fec05e 272:bb2b4613fdc8
187 o <- #{ 187 o <- #{
188 foo <- "bar" 188 foo <- "bar"
189 baz <- ["fizz" "buzz" "buzzzz"] 189 baz <- ["fizz" "buzz" "buzzzz"]
190 qux <- ((dict hash) set: "fo" "shizzle") set: "my" "nizzle" 190 qux <- ((dict hash) set: "fo" "shizzle") set: "my" "nizzle"
191 arr <- #["pirate" "booty"] 191 arr <- #["pirate" "booty"]
192 numbers <- [1 2 3 42 (0-1337)]
193 booleans <- [
194 true
195 false
196 ]
192 } 197 }
193 print: (encode: o) . "\n" 198 print: (encode: o) . "\n"
194 0 199 0
195 } 200 }
196 } 201 }