Ran into an issue in no signal where Godot was loading Vector2i
values as String
values. As it turns out, this is because Godot’s JSON implementation does not round trip correctly:
The above code outputs:
String: "(3, 2)"
Value: (3, 2)
Value is String? true
Value is Vector2i? false
As you can see, Godot converts the Vector2i
to a JSON string without any type information, so it can only reasonably parse the JSON string as a String
when parse_string
is called.
Instead, I was able to get around this issue by using var_to_str
and str_to_var
instead of the JSON
API.