From: Matt S Trout Date: Sun, 17 Jun 2012 23:36:44 +0000 (+0100) Subject: quick test script for the record X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da5050b28bcb51f8f333f1cbde60233dc9091d5a;p=scpubgit%2FTenDotTcl.git quick test script for the record --- diff --git a/test.tcl b/test.tcl new file mode 100644 index 0000000..cbe89cd --- /dev/null +++ b/test.tcl @@ -0,0 +1,17 @@ +source tcvJSON.tcl +package require tcvJSON + +set myobj [ tcvJSON::create list ] + +tcvJSON::add! myobj 1 +tcvJSON::add! myobj foo + +set mydeep [ tcvJSON::create obj ] + +tcvJSON::put! mydeep key value + +tcvJSON::add! -type auto myobj $mydeep + +puts $myobj + +puts [ tcvJSON::unparse $myobj 0 ]