K. S. Ernest (iFire) Lee
K. S. Ernest (iFire) Lee
How about? ```c++ static Variant convert_variant_from_native(const Variant &p_variant, bool p_allow_classes = false, bool p_allow_scripts = false); static Variant convert_variant_to_native(const Variant &p_json, bool p_allow_classes = false, bool p_allow_scripts = false); ```...
~~I don't think Object is serialized correctly.~~ Need to toggle the security options.
Rebased on master with no other changes.
Moved the json native tests to use Node for the Object variant and enable tests so they work without 3d. Edited: Test logs. https://gist.github.com/fire/3e7bba9d3e6dd2339a2acadacc79903c
Moved the memnew(Node) variable so it outlasts the for loop and then memdelete afterwards to avoid the memory leak.
Instead of Node * node, I have used Ref variable, which is a RefCounted and an object, and I don't need to handle object lifetimes.
You set allow scripts to be false so it will filter.
I don’t think it is the job of the json serialize to allow two objects with the same class name
Can you create a new issue? I'll have to nudge the gdscript team about this problem.
Yes! An error would be great so I didn’t need to go a wild goose chase.