Tcl Library Source Code

Check-in [0b57c2407c]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Finalized integration. Bumped to version 1.3.
Timelines: family | ancestors | descendants | both | ak-bug-6efa4f571af052-jsonc
Files: files | file ages | folders
SHA1: 0b57c2407cd0fbf41bc350fe95cf6c68b94b9a76
User & Date: andreask 2013-12-11 23:41:13
Context
2013-12-16
20:47
Integrated work on a first C parser for JSON. json 1.3, tcllibc 0.3.11. See ticket [6efa4f571a]. check-in: df814df3ab user: andreask tags: trunk
2013-12-11
23:41
Finalized integration. Bumped to version 1.3. Closed-Leaf check-in: 0b57c2407c user: andreask tags: ak-bug-6efa4f571af052-jsonc
23:29
Switched validation from the C parser back to a shared Tcl implementation, regexp based. It is consistently faster. No overhead creating irrelevant data structures is main suspected cause. check-in: 5a645be338 user: andreask tags: ak-bug-6efa4f571af052-jsonc
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/json/ChangeLog.














1
2
3
4
5
6
7












2013-06-19  Andreas Kupries  <[email protected]>

	* json.man: New command 'many-json2dict' to parse strings
	* json.pcx: containing more than one JSON entity. The existing
	* json.tcl: json2dict command will return only the first. Updated
	* json.test: documentation. Extended testsuite. Package version
	* pkgIndex.tcl: bumped to 1.2
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2013-12-11  Andreas Kupries  <[email protected]>

	* c: [Ticket 6efa4f571a]: Integrated a critcl binding of
	* json.bench: the json-c parser. Moved to a standard
	* json.man: switchable setup. json2dict and manyy-json2dict
	* json.tcl: are now switchable to C. Everything else kept
	* json.test: to Tcl. Note especially that Tcl 'validate'
	* json.testsuite: (regexp-based) was still faster than json-c.
	* json_tcl.tcl: Which has no mode for pure syntax checking,
	* jsonc.tcl: thus overhead with construction of irelevant data
	* pkgIndex.tcl: structures. Extended testsuite. New benchmark
	* testdata: suite. Version bumped to 1.3.

2013-06-19  Andreas Kupries  <[email protected]>

	* json.man: New command 'many-json2dict' to parse strings
	* json.pcx: containing more than one JSON entity. The existing
	* json.tcl: json2dict command will return only the first. Updated
	* json.test: documentation. Extended testsuite. Package version
	* pkgIndex.tcl: bumped to 1.2

Changes to modules/json/json.man.

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin json n 1.2]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]
[moddesc   {JSON}]
[titledesc {JSON parser}]
[category  {CGI programming}]
[require Tcl 8.4]
[require json [opt 1.2]]
[description]
[para]

The [package json] package provides a simple Tcl-only library for parsing the
JSON [uri http://www.json.org/] data exchange format as specified in RFC 4627
[uri http://www.ietf.org/rfc/rfc4627.txt].

>
|










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3]
[manpage_begin json n [vset VERSION]]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]
[moddesc   {JSON}]
[titledesc {JSON parser}]
[category  {CGI programming}]
[require Tcl 8.4]
[require json [opt [vset VERSION]]]
[description]
[para]

The [package json] package provides a simple Tcl-only library for parsing the
JSON [uri http://www.json.org/] data exchange format as specified in RFC 4627
[uri http://www.ietf.org/rfc/rfc4627.txt].

Changes to modules/json/json.tcl.

261
262
263
264
265
266
267
268
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.2






|
261
262
263
264
265
266
267
268
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3

Changes to modules/json/pkgIndex.tcl.

1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.2 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.2 [list source [file join $dir json_write.tcl]]


|



1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.2 [list source [file join $dir json_write.tcl]]