From 05652c3b7dea68a9ffc781b2cdf89076fce56b12 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 18 May 2024 19:40:49 +0200 Subject: [PATCH] Document that other JVM languages are not fully supported (#2666) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cd12727192..a4a674ba64 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ There are a few open-source projects that can convert Java objects to JSON. Howe > [!NOTE]\ > Gson is currently in maintenance mode; existing bugs will be fixed, but large new features will likely not be added. If you want to add a new feature, please first search for existing GitHub issues, or create a new one to discuss the feature and get feedback. +> [!IMPORTANT]\ +> Gson's main focus is on Java. Using it with other JVM languages such as Kotlin or Scala might work fine in many cases, but language-specific features such as Kotlin's non-`null` types or constructors with default arguments are not supported. This can lead to confusing and incorrect behavior.\ +> When using languages other than Java, prefer a JSON library with explicit support for that language. + ### Goals * Provide simple `toJson()` and `fromJson()` methods to convert Java objects to JSON and vice-versa * Allow pre-existing unmodifiable objects to be converted to and from JSON