unstale

npm / lossless-json

lossless-json

What changed in lossless-json 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.

5 breaking16 new APIs and options1 performance1 tooling

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

lossless-json 223 changes

Breaking changes 5

  • Support for circular references has been dropped; circular data structures should be prevented.

    2.0.0release notes

  • The constructor now accepts only a string; use toLosslessNumber to safely convert a number.

    2.0.0release notes

  • The undocumented .type property was dropped; use .isLosslessNumber instead.

    2.0.0release notes

  • Official support for Node.js 12 has been dropped.

    2.0.0release notes

  • parse now throws an error when it encounters a duplicate key.

    2.0.0release notes

New APIs and options 16

  • Built-in support for bigint was added.

    2.0.0release notes

  • Built-in Date support was added and is turned off by default; see reviveDate.

    2.0.0release notes

  • The library now exports ES modules, allowing developers to import only the functions they need instead of pulling in the full bundle.

    2.0.0release notes

  • getUnsafeNumberReason was added as an exported utility function.

    2.0.0release notes

  • isInteger was added as an exported utility function.

    2.0.0release notes

  • isLosslessNumber was added as an exported utility function.

    2.0.0release notes

  • isNumber was added as an exported utility function.

    2.0.0release notes

  • isSafeNumber was added as an exported utility function.

    2.0.0release notes

  • A new option makes serialization of numeric values customizable, supporting integration with BigNumber libraries or custom conversion logic.

    2.0.0release notes

  • parseLosslessNumber was added as an exported utility function.

    2.0.0release notes

  • A new option makes serialization of numeric values customizable, supporting integration with BigNumber libraries or custom conversion logic.

    2.0.0release notes

  • parseNumberAndBigInt was added as an exported utility function.

    2.0.0release notes

  • The release adds reviveDate for built-in Date support, which is turned off by default.

    2.0.0release notes

  • toLosslessNumber was added as an exported utility function for safely converting a number into a LosslessNumber.

    2.0.0release notes

  • toSafeNumberOrThrow was added as an exported utility function.

    2.0.0release notes

  • The library now exports a UMD bundle.

    2.0.0release notes

Performance 1

  • Performance of both parse and stringify has been improved.

    2.0.0release notes

Tooling 1

  • The library now comes with TypeScript definitions.

    2.0.0release notes