From 7059a1e91066c92ea92591ae5c0e083c4fdcc995 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 6 Apr 2024 14:44:35 +0200 Subject: [PATCH] Document that other JVM languages are not fully supported --- 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