MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / model_json

Function model_json

src/opencode_ai/_compat.py:127–130  ·  view source on GitHub ↗
(model: pydantic.BaseModel, *, indent: int | None = None)

Source from the content-addressed store, hash-verified

125
126
127def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
128 if PYDANTIC_V2:
129 return model.model_dump_json(indent=indent)
130 return model.json(indent=indent) # type: ignore
131
132
133def model_dump(

Callers 1

test_iso8601_datetimeFunction · 0.90

Calls 2

model_dump_jsonMethod · 0.80
jsonMethod · 0.45

Tested by 1

test_iso8601_datetimeFunction · 0.72