MCPcopy Create free account
hub / github.com/OpenRouterTeam/python-sdk / _get_serialized_params

Function _get_serialized_params

src/openrouter/utils/values.py:124–133  ·  view source on GitHub ↗
(
    metadata: ParamMetadata, field_name: str, obj: Any, typ: type
)

Source from the content-addressed store, hash-verified

122
123
124def _get_serialized_params(
125 metadata: ParamMetadata, field_name: str, obj: Any, typ: type
126) -> Dict[str, str]:
127 params: Dict[str, str] = {}
128
129 serialization = metadata.serialization
130 if serialization == "json":
131 params[field_name] = marshal_json(obj, typ)
132
133 return params
134
135
136def _is_set(value: Any) -> bool:

Callers 2

_populate_path_paramsFunction · 0.85
_populate_query_paramsFunction · 0.85

Calls 1

marshal_jsonFunction · 0.85

Tested by

no test coverage detected