Function value_to_value

Source
pub fn value_to_value(value: &Value) -> Value
Expand description

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

§Simple Value

{
    "__type": "boolean|double|decimal|integer|unsigned|string|uri|binary",
    "value": ...
}

§Value Constructor

{
    "__type": "constructor",
    "type_ref": "IdentifierReference",
    "value": {}
}

§Mapping

{
    "__type": "mapping",
    "domain": {},
    "range": {}
}

§Reference

{
    "__type": "type_ref",
    "value": "IdentifierReference",
}

§Sequence

{
    "__type": "sequence",
    "members": []
}