Home | History | Annotate | Download | only in json

Lines Matching refs:default

83     >>> json.dumps(2 + 1j, default=encode_complex)
85 >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j)
87 >>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j))
119 default=None,
124 encoding='utf-8', default=None, sort_keys=False, **kw):
132 If ``ensure_ascii`` is true (the default), all non-ASCII characters in the
153 representation. Since the default item separator is ``', '``, the
158 then it will be used instead of the default ``(', ', ': ')`` separators.
161 ``encoding`` is the character encoding for str instances, default is UTF-8.
163 ``default(obj)`` is a function that should return a serializable version
164 of obj or raise TypeError. The default simply raises TypeError.
166 If *sort_keys* is ``True`` (default: ``False``), then the output of
170 ``.default()`` method to serialize additional types), specify it with
178 encoding == 'utf-8' and default is None and not sort_keys and not kw):
186 default=default, sort_keys=sort_keys, **kw).iterencode(obj)
195 encoding='utf-8', default=None, sort_keys=False, **kw):
217 representation. Since the default item separator is ``', '``, the
222 then it will be used instead of the default ``(', ', ': ')`` separators.
225 ``encoding`` is the character encoding for str instances, default is UTF-8.
227 ``default(obj)`` is a function that should return a serializable version
228 of obj or raise TypeError. The default simply raises TypeError.
230 If *sort_keys* is ``True`` (default: ``False``), then the output of
234 ``.default()`` method to serialize additional types), specify it with
242 encoding == 'utf-8' and default is None and not sort_keys and not kw):
249 separators=separators, encoding=encoding, default=default,
317 of every JSON float to be decoded. By default this is equivalent to
322 of every JSON int to be decoded. By default this is equivalent to