File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,18 @@ See :ref:`json-commandline` for detailed documentation.
120
120
value) is also a subset of YAML 1.0 and 1.1. This module can thus also be
121
121
used as a YAML serializer.
122
122
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
+
123
135
124
136
Basic Usage
125
137
-----------
You can’t perform that action at this time.
0 commit comments