MCPcopy Create free account
hub / github.com/pallets/flask / object_hook

Method object_hook

tests/test_json.py:235–239  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

233
234 class CustomProvider(DefaultJSONProvider):
235 def object_hook(self, obj):
236 if len(obj) == 1 and "_foo" in obj:
237 return X(obj["_foo"])
238
239 return obj
240
241 def loads(self, s, **kwargs):
242 kwargs.setdefault("object_hook", self.object_hook)

Callers

nothing calls this directly

Calls 1

XClass · 0.85

Tested by

no test coverage detected