comparison tests/testJson.ur @ 0:63697ef80a2c

JSON, minus records and nulls
author Adam Chlipala <adam@chlipala.net>
date Thu, 02 Dec 2010 11:10:57 -0500
parents
children 4d103b4450ee
comparison
equal deleted inserted replaced
-1:000000000000 0:63697ef80a2c
1 fun main () : transaction page = return <xml><body>
2 {[Json.toJson (1 :: 2 :: 8 :: [])]}<br/>
3 {[Json.fromJson "[1,2, 8]" : list int]}
4 <hr/>
5 {[Json.toJson (1.2 :: 2.4 :: (-8.8) :: [])]}<br/>
6 {[Json.fromJson "[1.4,-2.7, 8.215506]" : list float]}
7 <hr/>
8 {[Json.toJson ("hi" :: "bye" :: "tricky\\\" one!" :: [])]}<br/>
9 {[Json.fromJson "[\"abc\", \"\\\\whoa\"]" : list string]}
10 <hr/>
11 {[Json.toJson (True :: False :: True :: [])]}<br/>
12 {[Json.fromJson "[true,false, true]" : list bool]}
13 </body></xml>