Function structure_to_value

Source
pub fn structure_to_value(defn: &StructureDef) -> Value
Expand description

Convert a SDML StructureDef into a context object, in the form shown as JSON below.

{
    "__type": "structure",
    "source_span": {},              // optional
    "name": "Identifier",
    "annotations": [],              // optional
    "members": []                   // optional
}

For members, see member_to_value.