Give JSON stronger support #4059
Replies: 2 comments 1 reply
-
See my closed pull request (I can reopen it if needed): But I think that Godot core developers are not really that interested in enhancing JSON support (or serialization/deserialization for that matter). Perhaps JSON5 could be incorporated in https://github.com/goostengine/goost, at least.
Are you aware of Those could also be improved, though: |
Beta Was this translation helpful? Give feedback.
-
Consider using ConfigFile instead of JSON to save user configuration and other data that does not need to interoperate with other (non-Godot) software. ConfigFile can serialize any Godot datatype automatically, without requiring you to write custom code for it. ConfigFile also happens to be more human-readable (and even writable) overall. Supporting the serialization of Godot datatypes in JSON wouldn't be very useful for the goal of interoperability I mentioned, since other software won't automatically know how to interpret those datatypes. |
Beta Was this translation helpful? Give feedback.
-
At present, gdscript's support for JSON seems incomplete.
For example, the built-in type of a
Vector2
cannot be converted to anArray
orDictionary
, and conversely, anArray
orDictionary
can not be parsed into a vector through built-in methods.And if it is possible, I hope godot can support JSON conversion of custom
Object
types.Like
object2dic
anddict2object
in Python.Beta Was this translation helpful? Give feedback.
All reactions