Skip to main content

module_to_dict

Function module_to_dict 

Source
pub fn module_to_dict(module: &ScannedModule) -> Value
Expand description

Convert a ScannedModule to a JSON Value with all 14 fields.

Unlike serde_json::to_value(&module) (which honours #[serde(skip_serializing_if = "Option::is_none")] on the struct and omits unset optionals), this function emits every field — using Value::Null for absent optionals — to match the to_dict wire format of the Python and TypeScript SDKs. Downstream tools that rely on a stable key set across languages should use this rather than the derived Serialize impl.