MCPcopy
hub / github.com/long2ice/fastapi-cache / encode

Method encode

fastapi_cache/coder.py:100–103  ·  view source on GitHub ↗
(cls, value: Any)

Source from the content-addressed store, hash-verified

98class JsonCoder(Coder):
99 @classmethod
100 def encode(cls, value: Any) -> bytes:
101 if isinstance(value, JSONResponse):
102 return value.body
103 return json.dumps(value, cls=JsonEncoder).encode()
104
105 @classmethod
106 def decode(cls, value: bytes) -> Any:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected