Changelog

jsonyx uses a [major].[feature].[fix] versioning scheme, where:

  • The major version increments for foundational changes or major overhauls,

  • The feature version increments for new features or enhancements, and

  • The fix version increments for bug or security fixes.

Warning

Breaking changes can occur in major and feature versions, so read the changelog before updating.

jsonyx 2.4.0 (Oct 6, 2026)

New Features:
Breaking Changes:
Other Changes:
  • Added free threading support

  • Improved diffing algorithm of jsonyx.make_patch()

  • Improved error messages

  • Replaced GPL-3.0 license with LGPL-3.0

Bug Fixes:

jsonyx 2.3.0 (Apr 30, 2025)

Changes:
  • Sped up string encoding

jsonyx 2.2.1 (Apr 21, 2025)

Bug Fixes:
  • Fixed #36: Fatal Python error: none_dealloc

  • Fixed #33: Performance regression compared to json

jsonyx 2.2.0 (Mar 31, 2025)

Breaking Changes:

jsonyx 2.1.0 (Mar 30, 2025)

New Features:

jsonyx 2.0.0 (Mar 27, 2025)

New Features:
Breaking Changes:
  • Added jsonyx.allow.NON_STR_KEYS (included in jsonyx.allow.EVERYTHING):

     >>> import jsonyx as json
     >>> import jsonyx.allow
    ->>> allow = jsonyx.allow.EVERYTHING
    +>>> allow = jsonyx.allow.EVERYTHING - jsonyx.allow.NON_STR_KEYS
     >>> json.dump({1: 0}, allow=allow)
     TypeError: Non-string keys are not allowed
    
  • Added jsonyx.allow.UNQUOTED_KEYS (included in jsonyx.allow.EVERYTHING):

     >>> import jsonyx as json
     >>> import jsonyx.allow
    ->>> allow = jsonyx.allow.EVERYTHING
    +>>> allow = jsonyx.allow.EVERYTHING - jsonyx.allow.UNQUOTED_KEYS
     >>> json.loads('{key: "value"}', allow=allow)
     Traceback (most recent call last):
       File "<string>", line 1
         {key: "value"}
          ^^^
     jsonyx.JSONSyntaxError: Unquoted keys are not allowed
    
  • Allowed overriding serialization in subclasses of float and int (e.g. enum.Enum):

     >>> import jsonyx as json
    ->>> from enum import Enum
    ->>> class MyEnum(int, Enum):
    +>>> from enum import ReprEnum
    +>>> class MyEnum(int, ReprEnum):
     ...     ZERO = 0
     ...
     >>> json.dump(MyEnum.ZERO)
     0
    
  • Made decimal.Decimal not serializable by default:

     >>> import jsonyx as json
     >>> from decimal import Decimal
    ->>> json.dump(Decimal('1.1'))
    +>>> json.dump(Decimal('1.1'), types={"float": Decimal})
     1.1
    
  • Removed jsonyx.allow.DUPLICATE_KEYS (included in jsonyx.allow.EVERYTHING):

     >>> import jsonyx as json
    ->>> import jsonyx.allow
    ->>> json.loads('{"a": 1, "a": 2, "a": 3}', allow=jsonyx.allow.DUPLICATE_KEYS)
    -{'a': 1, 'a': 2, 'a': 3}
    +>>> from multidict import MultiDict
    +>>> json.loads('{"a": 1, "a": 2, "a": 3}', hooks={"object": MultiDict})
    +<MultiDict('a': 1, 'a': 2, 'a': 3)>
    

    See multidict.MultiDict for more information.

  • Removed jsonyx.DuplicateKey:

    ->>> from jsonyx import DuplicateKey
    ->>> {"a": 1, DuplicateKey("a"): 2, DuplicateKey("a"): 3}
    -{'a': 1, 'a': 2, 'a': 3}
    +>>> from multidict import MultiDict
    +>>> MultiDict([('a', 1), ('a', 2), ('a', 3)])
    +<MultiDict('a': 1, 'a': 2, 'a': 3)>
    

    See multidict.MultiDict for more information.

  • Removed jsonyx.tool

  • Renamed python -m jsonyx to python -m jsonyx format

  • Replaced item_separator and key_separator with separators for jsonyx.Encoder, jsonyx.dump(), jsonyx.dumps() and jsonyx.write():

     >>> import jsonyx as json
     >>> obj = {"a": 1, "b": 2, "c": 3}
    ->>> json.dumps(obj, end="", item_separator=",", key_separator=":")
    +>>> json.dumps(obj, end="", separators=(",", ":"))
     '{"a":1,"b":2,"c":3}'
    
  • Replaced use_decimal with hooks for jsonyx.Decoder, jsonyx.load(), jsonyx.loads() and jsonyx.read():

     >>> import jsonyx as json
     >>> from decimal import Decimal
    ->>> json.loads("1.1", use_decimal=True)
    +>>> json.loads("1.1", hooks={"float": Decimal})
     Decimal('1.1')
    
Other Changes:
  • Added cache for indentations in the JSON encoder

  • Added support for Python 3.8 and Python 3.9

  • Improved documentation

  • Improved error messages

Bug Fixes:

jsonyx 1.2.1 (Aug 3, 2024)

Changes:
  • First conda release

Bug Fixes:
  • Fixed #2: Middle of error context is truncated incorrectly

jsonyx 1.2.0 (Aug 3, 2024)

New Features:
  • Added output_filename

  • Added -a as an alias to --ensure-ascii

  • Added -c as an alias to --compact

  • Added -C as an alias to --no-commas

  • Added -d as an alias to --use-decimal

  • Added -i as an alias to --indent

  • Added -s as an alias to --sort-keys

  • Added -S as an alias to --nonstrict

  • Added -t as an alias to --trailing-comma

  • Added -T as an alias to --indent-tab

Other Changes:
  • Renamed filename to input_filename

jsonyx 1.1.0 (Aug 3, 2024)

Breaking Changes:
  • Renamed python -m jsonyx.tool to python -m jsonyx

jsonyx 1.0.0 (Aug 3, 2024)

Changes:
  • Initial release