Skip to content

Commit ea9ace9

Browse files
committed
Fixed behavior of default fn in dump and dumps.
1 parent 337ba00 commit ea9ace9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

json5/lib.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from .parser import Parser
2121

22-
2322
if sys.version_info[0] < 3:
2423
str_types = (str, unicode)
2524
str = unicode # pylint: disable=redefined-builtin, invalid-name
@@ -316,7 +315,12 @@ def _dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, indent,
316315
allow_duplicate_keys, seen, level,
317316
item_sep, indent_str, end_str)
318317
else:
319-
s = default(obj)
318+
s = _dumps(default(obj), skipkeys, ensure_ascii,
319+
check_circular, allow_nan, indent,
320+
separators, default, sort_keys,
321+
quote_keys, trailing_commas,
322+
allow_duplicate_keys, seen, level,
323+
is_key)
320324

321325
if seen is not None:
322326
seen.remove(i)

0 commit comments

Comments
 (0)