jtc v1.72a - JSON test console
Release Notes for jtc v.1.72a (NOTE: The Release is republished, as prior binaries were incorrect ones)
New features:
- introduced a new directive
Iwhich let incrementing/decrementing numerical JSONs preserved in the namespace (and ignore other
JSON types), e.g.:<var>I3,<var>I-1. Ifvarwasn't defined before, the iteration begins with0;
however, it's possible to initialize it with other than0values - see User Guide - introduce an auto-namespace variable
$?to reference the last processed walk, this facilitates use-cases when converting
input JSON to.csvformat; see User Guide for more - introduced new lexemes
<..>P,<..>Nto match any JSON strings and JSON numerical types respectively. Before, to facilitate the
same, REGEX lexemes were used:<.*>Rand<.*>Drespectively, but new lexemes work faster and allow storing matched values in
the namespace) - Template-interpolation was enhanced with new capability to jsonize JSON strings (containing embedded JSONs) and stringify JSONs -
similar to respective options-qqand-rrbut now programmatically. See User Guide for the syntax and examples - added a new semantic to
-xoption:-xN[/M]notation lets specifying a frequency of walks to be displayed - (every Nth walk) staring
from the optional offsetM(zero based); e.g.:-x4- display every 4th walk, while-x4/1will do the same starting from the
2nd (index is zero based) walk.
Also, note a special notation case:-x0/N- will displayNth(zero based) walk only once, this could be abbreviated to-x/N;
Nis positive, but also supported-1value - to display the last walk
Improvements, changes, fixes:
- improved
-jloptions combination behavior: in some cases it wasn't robust and failed providing the expected result.
Plus, introduced a new merge format:-jlnn- all clashing values will be aggregated (disrespecting JSON structured grouping vs. as in
the case of-jl) - lifted handling of atomic JSONs - simplified the code allow applying walk-paths now even onto the atomic JSON values
- extended null-interpolation for JSON strings: before it was applied for JSON arrays and JSON objects only).
Now, the empty variable interpolation in the string, following either of,,;will be taken into account,
e.g.:-T'"{}, "'- if{}is empty, then result of interpolation will be empty too:"" - improved buffered file read speed (3 times faster) and stdin buffered speed (1.5-2 times faster), improved handling of
non-existent/bad file-arguments (when multiple given) - enhanced move semantic of
-u,-ioperations, so that when used together with-ppit also works as expected with those options
(before it was only working for-pand-ppnotation was ignored) - a last in the walk
klexeme (e.g.:-w'... <>k') is only subjected for re-interpretation of the label if it's empty (<>k) now;
the non-empty<..>klexeme then doesn't (the value is preserved in the namespace, so no need to re-interpret it then) - template pertain per walk feature used to work only for interleaved walks and
-nwas cancelling it (template then were applied
round-robin). Now, even with-n(i.e., for sequenced walk processing) templates are also pertained per walks,
in the unlikely event when round robin behavior is required-nnnotation will support it.
Also, template pertain per walk feature is enhanced to be engaged only when number of templates (-T)
matches the number of provided walks (-w), otherwise round-robin template application behavior is engaged. - put a hard cutoff on a too deep recursion shall any unforeseen case (while walking) occurs in the future;
the same enhancement has fixed a case of too deep recursion (with subsequent stack overflow) for a corner case of lexeme<>F
usage occurring in processing really huge JSONs only - the message "notice: option -J cancels streaming input" is printed now only when
-a+<stdin>were selected explicitly together
with-J(and not when-ais implicitly imposed upon-J) - fixed parsing debug (offset for a streamed read now shows a correct value - from the beginning of a stream, instead of
the beginning of an internal circular buffer, other read debugs (buffered, cin) are unaffected) - fixed empty
<>blexeme - it was not working (as documented), now it matches any boolean JSON value (UT'ed)