From 579f521328def83796ffb949befdd16810b529ce Mon Sep 17 00:00:00 2001 From: BrianGixxob Date: Wed, 10 Sep 2025 16:23:19 -0700 Subject: [PATCH] JSON limitations: add note re: JSON's 'from_native()' and 'to_native()'. --- tutorials/io/saving_games.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tutorials/io/saving_games.rst b/tutorials/io/saving_games.rst index 0776d93d3be..6c33ebca98f 100644 --- a/tutorials/io/saving_games.rst +++ b/tutorials/io/saving_games.rst @@ -356,7 +356,10 @@ Here are some important gotchas to know about when using JSON. JSON only offers a limited set of data types. If you have data types that JSON doesn't have, you will need to translate your data to and from types that JSON can handle. For example, some important types that JSON - can't parse are: ``Vector2``, ``Vector3``, ``Color``, ``Rect2``, and ``Quaternion``. + can't parse are: ``Vector2``, ``Vector3``, ``Color``, ``Rect2``, and ``Quaternion``. + You can overcome this limitation by using the + :ref:`from_native` and + :ref:`to_native` methods of :ref:`JSON`. * **Custom logic needed for encoding/decoding:** If you have any custom classes that you want to store with JSON, you will need to write your own logic for encoding and decoding those classes.