MCPcopy
hub / github.com/pallets/flask / dumps

Method dumps

src/flask/json/provider.py:41–47  ·  view source on GitHub ↗

Serialize data as JSON. :param obj: The data to serialize. :param kwargs: May be passed to the underlying JSON library.

(self, obj: t.Any, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

39 self._app: App = weakref.proxy(app)
40
41 def dumps(self, obj: t.Any, **kwargs: t.Any) -> str:
42 """Serialize data as JSON.
43
44 :param obj: The data to serialize.
45 :param kwargs: May be passed to the underlying JSON library.
46 """
47 raise NotImplementedError
48
49 def dump(self, obj: t.Any, fp: t.IO[str], **kwargs: t.Any) -> None:
50 """Serialize data as JSON and write to a file.

Callers 14

dumpMethod · 0.95
responseMethod · 0.95
json_dumpsMethod · 0.45
save_sessionMethod · 0.45
dumpsMethod · 0.45
dumpsFunction · 0.45
test_json_dump_dataclassFunction · 0.45
test_json_as_unicodeFunction · 0.45
test_json_decimalFunction · 0.45
test_json_attrFunction · 0.45
indexFunction · 0.45

Calls

no outgoing calls

Tested by 9

json_dumpsMethod · 0.36
test_json_dump_dataclassFunction · 0.36
test_json_as_unicodeFunction · 0.36
test_json_decimalFunction · 0.36
test_json_attrFunction · 0.36
indexFunction · 0.36
test_json_customizationFunction · 0.36
test_html_methodFunction · 0.36