MCPcopy Create free account
hub / github.com/simplejson/simplejson / _make_shared_encoder

Function _make_shared_encoder

tsan_stress_simplejson.py:148–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146
147
148def _make_shared_encoder():
149 # Matches the argument order in simplejson/encoder.py c_make_encoder call.
150 markers = {}
151 key_memo = {}
152 return _speedups.make_encoder(
153 markers, # markers (cycle detection)
154 lambda o: str(o), # default
155 _speedups.encode_basestring_ascii, # _encoder (ascii)
156 None, # indent
157 ": ", ", ", # key_sep, item_sep
158 False, # sort_keys
159 False, # skipkeys
160 True, # allow_nan
161 key_memo, # key_memo
162 False, # use_decimal
163 False, # namedtuple_as_object
164 True, # tuple_as_array
165 None, # int_as_string_bitcount (None or positive int)
166 None, # item_sort_key
167 "utf-8", # encoding
168 False, # for_json
169 False, # ignore_nan
170 decimal.Decimal, # Decimal
171 False, # iterable_as_array
172 )
173
174
175# Varied JSON documents exercising dict / list / string / number / escapes.

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…