MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / _serialize_default

Function _serialize_default

src/ifcedit/ifcedit/discover.py:206–212  ·  view source on GitHub ↗

Serialize a default value to something JSON-friendly.

(value)

Source from the content-addressed store, hash-verified

204
205
206def _serialize_default(value):
207 """Serialize a default value to something JSON-friendly."""
208 if value is None:
209 return None
210 if isinstance(value, (str, int, float, bool)):
211 return value
212 return repr(value)
213
214
215def _parse_docstring_body(docstring: str) -> tuple[str, str]:

Callers 1

_extract_paramsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected