File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,18 @@ See :ref:`json-commandline` for detailed documentation.
120120 value) is also a subset of YAML 1.0 and 1.1. This module can thus also be
121121 used as a YAML serializer.
122122
123+ .. note ::
124+
125+ This module's encoders and decoders preserve input and output order by
126+ default. Order is only lost if the underlying containers are unordered.
127+
128+ Prior to Python 3.7, :class: `dict ` was not guaranteed to be ordered, so
129+ inputs and outputs were typically scrambled unless
130+ :class: `collections.OrderedDict ` was specifically requested. Starting
131+ with Python 3.7, the regular :class: `dict ` became order preserving, so
132+ it is no longer necessary specify :class: `collections.OrderedDict ` for
133+ JSON generation and parsing.
134+
123135
124136Basic Usage
125137-----------
You can’t perform that action at this time.
0 commit comments