-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename JSON::print() to to_json() #44574
Conversation
129378d
to
749e205
Compare
would suffice better |
I don't think the name should be consistent with the GDScript function, especially since it is planned to remove it. At the same time, it makes sense to be consistent with JavaScript ( |
Also, |
With those names, though, it is not immediately obvious which one does which. |
|
We discussed this in a PR review meeting today, basically we now have two different approaches to parsing JSON:
|
Superseded by #44806. |
As originally identified here, currently,
JSON::print()
doesn't print anything, it converts the specifiedVariant
to a JSONString
. Since, other references to this method in Godot -- including the @GDscript version of this method (in 3.2) -- that call this method are allto_json()
, it makes sense to rename this methodto_json()
.Part of #16863.