Tcl Library Source Code

Check-in [c51875a02a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initial work on a critcl json parser based on json-c. Issues: many-json2dict has no C equivalent, nor the *2dict commands. Boolean is 0/1 vs true/false in C vs. Tcl, this should be fixable in the testsuite. Basics are working.
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | ak-bug-6efa4f571af052-jsonc
Files: files | file ages | folders
SHA1: c51875a02a4c3ce991709f22ea5184cc5d10d9f1
User & Date: andreask 2013-12-10 00:50:27.683
Context
2013-12-10
23:01
Integrated additional MI work on a Tcl_ObjType for lazier construction of the Tcl structures from the json C structures. Notes - Modified the Tcl parser to return 0|1 for boolean values, to match the new C parser. Updated testsuite. - Supplied my own definition of assert to fit in with Tcl (Tcl_Panic). - Modified the C conversion of json null to match the Tcl parser, is now 'null', not the empty string. - Changed Tcl_Dict* uses to equivalent Tcl_List* to keep the code usable for Tcl 8.4 - Moved the code handling the deferral/laziness into lazy_value2obj and applied it to array elements as well, not just object fields. - Moved the variables in value2obj into the switch branches. - Changed the Tcl_ObjType structure initialization to regular C. Code as provided (see ticket attachment json2.c) looked like some GCC-ism. Open question - Why does the json2string function not just generate the string rep, but takes the int.rep as well, shimmering the Tcl_Obj*. Seems to presume that the string generation is immediately followed by Tcl code forcing a shimmer anyway ?! Reduced testsuite passes. check-in: 8fc03c91fd user: andreask tags: ak-bug-6efa4f571af052-jsonc
00:50
Initial work on a critcl json parser based on json-c. Issues: many-json2dict has no C equivalent, nor the *2dict commands. Boolean is 0/1 vs true/false in C vs. Tcl, this should be fixable in the testsuite. Basics are working. check-in: c51875a02a user: andreask tags: ak-bug-6efa4f571af052-jsonc
2013-12-06
22:44
Fixed doc typo. check-in: c3973cc954 user: andreask tags: trunk
Changes
Unified Diff Side-by-Side Diff Patch
Added modules/json/c/AUTHORS.
Added modules/json/c/COPYING.
Added modules/json/c/ChangeLog.
Added modules/json/c/NEWS.
Added modules/json/c/README.
Added modules/json/c/arraylist.c.
Added modules/json/c/arraylist.h.
Added modules/json/c/bits.h.
Added modules/json/c/config.h.
Added modules/json/c/debug.c.
Added modules/json/c/debug.h.
Added modules/json/c/json.h.
Added modules/json/c/json_c_version.c.
Added modules/json/c/json_c_version.h.
Added modules/json/c/json_config.h.
Added modules/json/c/json_inttypes.h.
Added modules/json/c/json_object.c.
Added modules/json/c/json_object.h.
Added modules/json/c/json_object_iterator.c.
Added modules/json/c/json_object_iterator.h.
Added modules/json/c/json_object_private.h.
Added modules/json/c/json_tokener.c.
Added modules/json/c/json_tokener.h.
Added modules/json/c/json_util.c.
Added modules/json/c/json_util.h.
Added modules/json/c/libjson.c.
Added modules/json/c/linkhash.c.
Added modules/json/c/linkhash.h.
Added modules/json/c/printbuf.c.
Added modules/json/c/printbuf.h.
Changes to modules/json/json.tcl.
Changes to modules/json/json.test.
Added modules/json/json.testsuite.
Added modules/json/json_tcl.tcl.
Added modules/json/jsonc.tcl.
Added modules/json/jsonc_tcl.tcl.
Added modules/json/test_support.tcl.
Changes to modules/tcllibc.tcl.
Changes to support/installation/version.tcl.