Backward incompatible change to -c CODE and -e CODE changing their
implementation to use a JS function for processing rather than
vm.runInNewContext. This is the technique for which the -C CODE and -E
CODE options were added in version 7.0.0. Basically: This technique is
obviously better because it is 10x faster, so it is being made the only
supported way. -C and -E, then, become synonyms and may be removed
in a later release.

Unfortunately this does mean a few semantic differences in the CODE, the
most noticeable of which is that this is required to access the object
fields:

See the notes on json 7.0.0 below for full details on the
performance improvements and semantic changes.

json 8.0.0

[pull #70] Move from 'jsontool' to 'json' in the npm registry! Thanks
to https://github.com/zpoley for graciously giving up the name, and to
@izs for driving. npm install json FTW. Here after jsontool will
stagnate at version 7.0.2.

The speed difference in json is in how the given CODE is executed: the new
implementation uses a JS function, while the -c/-e options use node.js's
vm.runInNewContext. This change means some semantic changes to the given
CODE. Some examples to show the semantic differences:

The changes for this have changed jsontool.parseLookup and
jsontool.handleLookup incompatibly. However, using "jsontool.js" is
experimental and extremely rare. Please contact me if this impacts you.

Support for node 0.11.x -- basically stop using util.puts.

Note that apparently vm.runInNewContext has changed in node 0.11.x such
that the following no longer works:

$ echo '["a", "b"]' | json -A -e 'this[0]="A"'
[
"A",
"b"
]

The result with node 0.11.x is actually:

$ echo '["a", "b"]' | json -A -e 'this[0]="A"'
[
"a",
"b"
]

Using the new -E works:

$ echo '["a", "b"]' | json -A -E 'this[0]="A"'
[
"A",
"b"
]

All the more reason to use the new -E CODE.

Change to 4-space indents. 'make check' clean. No functional change.

Include project url (and my name) in json --version. Also show JSON
formatted version info with -j. The point here isn't self-agrandization
but to help differentiate from the other json tool out there (npm home
json).

json 5.1.2

json 5.1.1

[issue #42] Fix an edge case where a blank line would be emitted for
... | json -ga -c COND where the COND resulted in no matches.

[issue #40] Improve "Lookups" section of docs to show how to lookup
non-identifier keys.

json 5.1.0

[pull #39, issue #34] json -ga streams. (Largely by Fred Kuo, github.com/fkuo)
This means you can use json with an input stream of JSON objects. E.g.:

yes '{"foo":"bar"}' | json -ga

Limitations: As was already a limitation of the '-g' switch, this only
supports JSON objects delimited by newlines or with no space:

{"a":1}{"b":2} # good
{"a":1}\n{"b":2} # good
{"a":1} {"b":2} # bad

Additionally, currently only a stream of objects is supported, not
a stream of arrays. Such are the typical use cases I've encountered.

json 5.0.0

[backward incompatible, issue #35] Special case the output for a single
lookup AND JSON output (i.e. -j or -o json*) to only output the value
instead of the more general array or table that is necessary for multiple
lookups. For objects:

json 3.3.0

Drop jsontool v2 dependency. This had been added for the first few json3
releases to provide a json2 for comparison. json v3 is fairing well
enough now to not bother.

json 3.2.0

Support negative array indeces (a la Python list indeces), e.g.:

$ echo '["a", "b", "c"]' | json -- -1
c

json 3.1.2

Update man page and move bulk examples from README to man page. Use ronn (the
ruby one) instead of ronnjs: better and more reliable formatting. Add 'make
docs' and 'make publish' (the latter to push to GH pages at
http://trentm.com/json).

[issue #31] Fix error message for json -o.

json 3.1.1

[issue #32] Fix '-D' option processing so json -D/ works (no space).

json 3.1.0

[pull #29] Add '-D' option to set a delimiter for lookups (default is '.'),
so that this example works:

$ echo '{"a.b": {"b": 1}}' | json -D / a.b/b
1

By Yaniv Aknin.

json 3.0.3

[issue #30] Fix lookup strings with multiple double-quotes.

[issue #28] Don't error on a multi-level lookup where one of the components
is undefined. E.g., the following is no longer an error:

json 3.0.2

json 3.0.1

Fix a bogus 'json' dep.

json 3.0.0

Switched to json 3.x dev on master. "2.x" branch created for any
necessary 2.x releases. See the
2.x changelog here.

[Backward incompatible] A significant change to 'jsony' default output and
some use cases to increase utility. These changes necessitated a few
backward incompatible changes. However, care was take to only break
compat for (a) rare use cases and (b) where utility was much improved.
See https://github.com/trentm/json/wiki/backward-incompat-json-3-changes
for full details of backward incompatible changes.

New "conditional filtering" via the -c CODE option. If the input is an
array, then -c will automatically switch to processing each element
of the array. Example:

This is still experimental because I want to feel it out (is it useful?
does it cause problems for regular usage?) and it is incomplete. The
second example above shows that with '*', json can emit multiple JSON
documents. json needs to change to support accepting multiple JSON
documents.

Also, a limitation: How to extract multiple fields from a list of
objects? Is this even a necessary feature? Thinking out loud: