Index: modules/json/json.man ================================================================== --- modules/json/json.man +++ modules/json/json.man @@ -1,7 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset VERSION 1.3.3] +[vset VERSION 1.3.4] [manpage_begin json n [vset VERSION]] [keywords {data exchange}] [keywords {exchange format}] [keywords javascript] [keywords json] Index: modules/json/json.tcl ================================================================== --- modules/json/json.tcl +++ modules/json/json.tcl @@ -217,16 +217,19 @@ # would slow down tokenizing by a factor of up to 3! variable positiveRE {[1-9][[:digit:]]*} variable cardinalRE "-?(?:$positiveRE|0)" variable fractionRE {[.][[:digit:]]+} variable exponentialRE {[eE][+-]?[[:digit:]]+} - variable numberRE "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?" + variable numberREa "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?" + variable numberREb "${fractionRE}(?:$exponentialRE)?" + variable numberREc "${cardinalRE}\[.\](?:$exponentialRE)?" + variable numberRE "$numberREa|$numberREb|$numberREc" + variable numberRE "$numberREa|$numberREb|$numberREc" # JSON token, and validation variable tokenRE "$singleCharTokenRE|$stringRE|$wordTokenRE|$numberRE" variable tokenREv "$singleCharTokenRE|$stringREv|$wordTokenRE|$numberRE" - # 0..n white space characters set whiteSpaceRE {[[:space:]]*} # Regular expression for validating a JSON text @@ -277,6 +280,6 @@ } # ### ### ### ######### ######### ######### ## Ready -package provide json 1.3.3 +package provide json 1.3.4 Index: modules/json/json_tcl.tcl ================================================================== --- modules/json/json_tcl.tcl +++ modules/json/json_tcl.tcl @@ -21,11 +21,12 @@ set tokens [regexp -all -inline -- $tokenRE $jsonText] set nrTokens [llength $tokens] set tokenCursor 0 -#puts T:\t[join $tokens \nT:\t] + #puts I:($jsonText) + #puts T:\t[join $tokens \nT:\t] return [parseValue $tokens $nrTokens tokenCursor] } # Parse multiple JSON entities in a string into a list of dictionaries # @param jsonText JSON text to parse Index: modules/json/pkgIndex.tcl ================================================================== --- modules/json/pkgIndex.tcl +++ modules/json/pkgIndex.tcl @@ -1,7 +1,7 @@ # Tcl package index file, version 1.1 if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded json 1.3.3 [list source [file join $dir json.tcl]] +package ifneeded json 1.3.4 [list source [file join $dir json.tcl]] if {![package vsatisfies [package provide Tcl] 8.5]} {return} package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]] Index: modules/json/tests/support.tcl ================================================================== --- modules/json/tests/support.tcl +++ modules/json/tests/support.tcl @@ -82,11 +82,20 @@ set TCL(emptyList4) {{}} set JSON(escapes) {"\t\r\n\f\b\/\\\""} set TCL(escapes) "\t\r\n\f\b/\\\"" - +foreach {label json tcl} { + fp1.1 1.1 1.1 + fp1. 1. 1. + fp.1 .1 .1 + fp0.1 0.1 0.1 + fp1 1 1 +} { + set JSON($label) $json + set TCL($label) $tcl +} foreach f [TestFilesGlob tests/*.fail] { set name [file rootname [file tail $f]] set FAIL($name) [tcltest::viewFile $f] }