MCPcopy
hub / github.com/django/django / _init_options

Method _init_options

django/core/serializers/json.py:23–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 internal_use_only = False
22
23 def _init_options(self):
24 self._current = None
25 self.json_kwargs = self.options.copy()
26 self.json_kwargs.pop("stream", None)
27 self.json_kwargs.pop("fields", None)
28 if self.options.get("indent"):
29 # Prevent trailing spaces
30 self.json_kwargs["separators"] = (",", ": ")
31 self.json_kwargs.setdefault("cls", DjangoJSONEncoder)
32 self.json_kwargs.setdefault("ensure_ascii", False)
33
34 def start_serialization(self):
35 self._init_options()

Callers 1

start_serializationMethod · 0.95

Calls 4

copyMethod · 0.45
popMethod · 0.45
getMethod · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected