UCE Docs / DValue::to_stringmap

Signature

StringMap DValue::to_stringmap() const

Parameters

return value : StringMap copy of the value

Converts a DValue to StringMap. Map children become entries converted with to_string(). Non-empty strings become value=<string>. f64, bool, and pointer values become value=<to_string()>. References that cannot be resolved produce an empty map.

Example

DValue user;
user["name"] = "Ada";
StringMap fields = user.to_stringmap();
print(fields["name"], "\n");
Output
Ada