Function var_to_str
pub fn var_to_str(variable: &Variant) -> GStringExpand description
Converts a Variant variable to a formatted String that can then be parsed using [method str_to_var].
var a = { "a": 1, "b": 2 }
print(var_to_str(a))Prints:
{
"a": 1,
"b": 2
}Note: Converting Signal or Callable is not supported and will result in an empty value for these types, regardless of their data.