Having a quick look at the source code for the function, you can see that it takes a Variant type. This is basically all the base types in Godot (including the containers). The containers are handled recursively (“deep copy”). There doesn’t look to be any system to handle cyclic references. RPC does appear to be the same.
The Variant is ultimately processed by the encode_variant function in marshalls.cpp if you’re curious: https://github.com/godotengine/godot/blob/master/core/io/marshalls.cpp#L694
Here’s the full list (taken from variant.h: https://github.com/godotengine/godot/blob/master/core/variant.h#L75)
// atomic types
// math types
VECTOR2, // 5
QUAT, // 10
// misc types
NODE_PATH, // 15
ARRAY, // 20
POOL_VECTOR2_ARRAY, // 25
Thank you, but does not fully answer the question since you didn’t say whether the encoding is a deep copy. I will look at marshalls.cpp and try to figure it out there, though.
raymoo | 2017-06-08 13:05
Looks like it does do a deep copy, and that there is no cycle checking.
raymoo | 2017-06-08 13:11
Yeah I had found the same. I updated the answer
quinno | 2017-06-08 13:16