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:
Added
formatterstojsonyx.Encoder,jsonyx.dump(),jsonyx.dumps()andjsonyx.write()Made
frozendictserializable by default
- Breaking Changes:
Allowed overriding serialization in subclasses of
str(e.g.enum.Enum):>>> import jsonyx as json ->>> from enum import Enum ->>> class MyEnum(str, Enum): +>>> from enum import ReprEnum +>>> class MyEnum(str, ReprEnum): ... EMPTY = "" ... >>> json.dump(MyEnum.EMPTY) ""
Removed
--use-decimal(alias-d) fromjsonyx diff,jsonyx formatandjsonyx patchRemoved
use_decimalfromjsonyx.apply_filter(),jsonyx.apply_patch(),jsonyx.load_query_value(),jsonyx.paste_values(),jsonyx.select_nodes(), andjsonyx.ManipulatorRemoved
decimal.Decimalsupport fromjsonyx.make_patch()
- 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:
Fixed python/cpython#142831: Use-after-free in
jsonyx.dumps()mapping iteration via re-entrant key encoder
jsonyx 2.3.0 (Apr 30, 2025)¶
- Changes:
Sped up string encoding
jsonyx 2.2.1 (Apr 21, 2025)¶
jsonyx 2.2.0 (Mar 31, 2025)¶
- Breaking Changes:
Added
cache_keys(defaultFalseinstead ofTrue) tojsonyx.Decoder,jsonyx.load(),jsonyx.loads()andjsonyx.read()
jsonyx 2.1.0 (Mar 30, 2025)¶
- New Features:
Added
check_circular,hookandskipkeystojsonyx.Encoder,jsonyx.dump(),jsonyx.dumps()andjsonyx.write()
jsonyx 2.0.0 (Mar 27, 2025)¶
- New Features:
Added the
jsonyxapplicationAdded
commas,indent_leaves,max_indent_level,quoted_keysandtypestojsonyx.Encoder,jsonyx.dump(),jsonyx.dumps()andjsonyx.write()Added
encodingtojsonyx.write()andjsonyx.Encoder.write()Added
python -m jsonyx diffAdded
python -m jsonyx patchAdded
--no-indent-leaves(alias-l) topython -m jsonyx formatAdded
--max-indent-level(alias-L) topython -m jsonyx formatAdded
--unquoted-keys(alias-q) topython -m jsonyx formatAdded
--version(alias-v) topython -m jsonyxAdded
jsonyx.apply_filter()Added
jsonyx.apply_patch()Added
jsonyx.make_patch()Added
jsonyx.paste_values()Added
jsonyx.select_nodes()Added
jsonyx.ManipulatorMade
tupleserializable by default
- Breaking Changes:
Added
jsonyx.allow.NON_STR_KEYS(included injsonyx.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 injsonyx.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
floatandint(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.Decimalnot 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 injsonyx.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.MultiDictfor 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.MultiDictfor more information.Removed
jsonyx.toolRenamed
python -m jsonyxtopython -m jsonyx formatReplaced
item_separatorandkey_separatorwithseparatorsforjsonyx.Encoder,jsonyx.dump(),jsonyx.dumps()andjsonyx.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_decimalwithhooksforjsonyx.Decoder,jsonyx.load(),jsonyx.loads()andjsonyx.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:
Fixed #32: Line comments continue until the end of file
Fixed python/cpython#125660: Python implementation of
jsonyx.loads()accepts invalid unicode escapesFixed python/cpython#125682: Python implementation of
jsonyx.loads()accepts non-ascii digits
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_filenameAdded
-aas an alias to--ensure-asciiAdded
-cas an alias to--compactAdded
-Cas an alias to--no-commasAdded
-das an alias to--use-decimalAdded
-ias an alias to--indentAdded
-sas an alias to--sort-keysAdded
-Sas an alias to--nonstrictAdded
-tas an alias to--trailing-commaAdded
-Tas an alias to--indent-tab
- Other Changes:
Renamed
filenametoinput_filename
jsonyx 1.1.0 (Aug 3, 2024)¶
- Breaking Changes:
Renamed
python -m jsonyx.tooltopython -m jsonyx
jsonyx 1.0.0 (Aug 3, 2024)¶
- Changes:
Initial release