MCPcopy
hub / github.com/pydantic/pydantic / as_jsonable_value

Function as_jsonable_value

pydantic/_internal/_known_annotated_metadata.py:101–104  ·  view source on GitHub ↗
(v: Any)

Source from the content-addressed store, hash-verified

99
100
101def as_jsonable_value(v: Any) -> Any:
102 if type(v) not in (int, str, float, bytes, bool, type(None)):
103 return to_jsonable_python(v)
104 return v
105
106
107def expand_grouped_metadata(annotations: Iterable[Any]) -> Iterable[Any]:

Callers 1

apply_known_metadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected