Skip to content

Releases: kshetline/json-z

v6.0.0

08 Jun 06:51
22daec1

Choose a tag to compare

  • Added maxIndent, noIndent, and propertyFilter stringification options.
  • Added context callback parameter for both replacers and revivers with context.holder and context.stack values.
  • The above results in a breaking change from 5.x versions of JSON-Z, where the third parameter of a replacer/reviver callback might be expected, depending on context, to be a holder object. This change results in a more consistent callback paradigm.

v5.2.0

06 Jun 06:53
4f1b0e9

Choose a tag to compare

  • Added JSON.EXCISE return value for replacers and revivers, allowing array items to be conveniently deleted along with their slot in an array.
  • Smarter array item deletion via replacers and revivers if those functions manipulate parent array sizes.
  • Correct line counting with mixed line ending formats (relevant for how the locations of errors are reported).

v5.1.0

03 Jun 09:10
9b0e88b

Choose a tag to compare

  • Approximately 3–4 times faster parsing than 5.0.x versions.
  • JSON-Z will now honor an object’s toJSON5() method, if present, at higher priority than toJSON(), and lower priority than toJSONZ().
  • Updated the allowed CLI arguments to match the latest JSON5 CLI.

v5.0.1

26 May 01:09
83be2fc

Choose a tag to compare

  • Eliminated minimist dependency. (Package is now dependency-free.)

Changes from 5.0.0:

  • JSON-Z can now be used as an ESM module. There are no functional changes, but a possible breaking change with how the package is imported:

import JSONZ from 'json-z'; instead of import * as JSONZ from 'json-z';

  • Updated grammar documentation.

v5.0.0

25 May 22:54
3997c69

Choose a tag to compare

  • JSON-Z can now be used as an ESM module. There are no functional changes, but a possible breaking change with how the package is imported:

import JSONZ from 'json-z'; instead of import * as JSONZ from 'json-z';

  • Updated grammar documentation.

v4.2.6

24 May 11:57
aaa3c76

Choose a tag to compare

Fixed assorted replacer/reviver bugs.

v4.2.0

23 May 13:42
80eee81

Choose a tag to compare

  • Provide reviver callbacks with the source text of primitive values.
  • Make sure reviver callbacks are not called for the internal components of decimal or big decimal objects.

v4.1.1

22 May 06:46
7ed80dc

Choose a tag to compare

Fix NPE when reviver function encounters a null value.

v4.1.0

21 May 02:51
e927eb8

Choose a tag to compare

Added a new replacer function feature, JSONZ.LITERALLY_AS, allowing a replacer function to explicitly determine how a value will be rendered when stringified.

v4.0.1

20 May 20:55

Choose a tag to compare

Changes from v3.2.1:

  • Added complete grammar documentation.
  • Support for older versions of JavaScript which do not handle BigInt dropped.
  • Related API for setting an external BigInt handler removed.
  • Fixed-precision decimal numbers are now explicitly IEEE 754 Decimal128 numbers.
  • Nomenclature to distinguish between fixed-precision and arbitrary-precision decimals has changed. It's now simply Decimal or BigDecimal rather than FixedBigDecimal or BigDecimal.
  • Replaced tap testing with mocha/chai test suite.
  • Testing for fixed-precision decimals is now done using proposal-decimal package from ECMA TC39 JavaScript Decimal proposal.
  • Backtick-quoted strings must escape the { character when it follows the $ to prevent confusion with template literals (`${` ➜ `$\{`).

Changes from v4.0.0:

  • Minor documentation tweak.