@@ -126,7 +126,7 @@ See :ref:`json-commandline` for detailed documentation.
126126Basic Usage
127127-----------
128128
129- .. function :: dump(obj, fp, skipkeys=False, ensure_ascii=True, \
129+ .. function :: dump(obj, fp, *, skipkeys=False, ensure_ascii=True, \
130130 check_circular=True, allow_nan=True, cls=None, \
131131 indent=None, separators=None, default=None, \
132132 sort_keys=False, **kw)
@@ -184,8 +184,11 @@ Basic Usage
184184 :meth: `default ` method to serialize additional types), specify it with the
185185 *cls * kwarg; otherwise :class: `JSONEncoder ` is used.
186186
187+ .. versionchanged :: 3.6
188+ All optional parameters are now :ref: `keyword-only <keyword-only_parameter >`.
187189
188- .. function :: dumps(obj, skipkeys=False, ensure_ascii=True, \
190+
191+ .. function :: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
189192 check_circular=True, allow_nan=True, cls=None, \
190193 indent=None, separators=None, default=None, \
191194 sort_keys=False, **kw)
@@ -209,7 +212,7 @@ Basic Usage
209212 the original one. That is, ``loads(dumps(x)) != x `` if x has non-string
210213 keys.
211214
212- .. function :: load(fp, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
215+ .. function :: load(fp, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
213216
214217 Deserialize *fp * (a ``.read() ``-supporting :term: `file-like object `
215218 containing a JSON document) to a Python object using this :ref: `conversion
@@ -257,7 +260,10 @@ Basic Usage
257260 If the data being deserialized is not a valid JSON document, a
258261 :exc: `JSONDecodeError ` will be raised.
259262
260- .. function :: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
263+ .. versionchanged :: 3.6
264+ All optional parameters are now :ref: `keyword-only <keyword-only_parameter >`.
265+
266+ .. function :: loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
261267
262268 Deserialize *s * (a :class: `str ` instance containing a JSON document) to a
263269 Python object using this :ref: `conversion table <json-to-py-table >`.
@@ -271,7 +277,7 @@ Basic Usage
271277Encoders and Decoders
272278---------------------
273279
274- .. class :: JSONDecoder(object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)
280+ .. class :: JSONDecoder(*, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)
275281
276282 Simple JSON decoder.
277283
@@ -341,6 +347,9 @@ Encoders and Decoders
341347 If the data being deserialized is not a valid JSON document, a
342348 :exc: `JSONDecodeError ` will be raised.
343349
350+ .. versionchanged :: 3.6
351+ All parameters are now :ref: `keyword-only <keyword-only_parameter >`.
352+
344353 .. method :: decode(s)
345354
346355 Return the Python representation of *s * (a :class: `str ` instance
@@ -359,7 +368,7 @@ Encoders and Decoders
359368 extraneous data at the end.
360369
361370
362- .. class :: JSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
371+ .. class :: JSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
363372
364373 Extensible JSON encoder for Python data structures.
365374
@@ -438,6 +447,9 @@ Encoders and Decoders
438447 otherwise be serialized. It should return a JSON encodable version of the
439448 object or raise a :exc: `TypeError `.
440449
450+ .. versionchanged :: 3.6
451+ All parameters are now :ref: `keyword-only <keyword-only_parameter >`.
452+
441453
442454 .. method :: default(o)
443455
0 commit comments