You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by ch...@apache.org on 2026/08/20 11:50:42 UTC
(fory-site) 03/05: π synced local 'docs/start/' with remote 'docs/start/'
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit c181722f44292e4cb652f8990a9762239604ed92
Author: chaokunyang <sh...@gmail.com>
AuthorDate: Thu Aug 20 11:50:33 2026 +0000
π synced local 'docs/start/' with remote 'docs/start/'
---
docs/start/index.md | 4 ++--
docs/start/kotlin.md | 44 ++++++++++++++++++++++++++++++++++++++++----
2 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/docs/start/index.md b/docs/start/index.md
index cfc88ef6867..9520de1ed27 100644
--- a/docs/start/index.md
+++ b/docs/start/index.md
@@ -38,7 +38,7 @@ packages. For source downloads, see the Apache Foryβ’
## Choose a Language
-Each language page provides a release-pinned installation snippet, a minimal
+Each language page provides a version-pinned installation snippet, a minimal
round trip for an application project, and the next capability-specific steps:
| Language | Setup |
@@ -61,7 +61,7 @@ round trip for an application project, and the next capability-specific steps:
| -------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------- | -------------------------------------------------------- |
| Object Serialization | Reconstruct object graphs, including shared references and schema changes | All languages | [Object Serialization](../object-serialization/index.md) |
| Row Format | Trusted analytical data with zero-copy, random, or partial field access | Java, Python, C++, Rust | [Row Format](../row-format/index.md) |
-| Fory JSON | High-performance standard JSON mapping | Java | [Fory JSON](../json/index.md) |
+| Fory JSON | High-performance standard JSON mapping | Java, Kotlin, Scala | [Fory JSON](../json/index.md) |
| Fory IDL | Generate native models and serializers from Fory, protobuf, or FlatBuffers IDL | All languages | [Fory IDL and Compiler](../compiler/index.md) |
| Fory gRPC | Use generated models over normal gRPC transports with Fory-encoded messages | Java, Python, C++, Go, Rust, JavaScript, C#, Dart, Scala, Kotlin | [Fory gRPC](../grpc/index.md) |
diff --git a/docs/start/kotlin.md b/docs/start/kotlin.md
index bf3218a107c..e431cb92897 100644
--- a/docs/start/kotlin.md
+++ b/docs/start/kotlin.md
@@ -19,8 +19,8 @@ license: |
limitations under the License.
---
-Fory Kotlin provides binary Object Serialization, generated models, Fory gRPC,
-and Android support. It runs on Fory Java and supports Java 8 and later.
+Fory Kotlin provides binary Object Serialization, standard JSON mapping, generated models, Fory
+gRPC, and Android support. It runs on Fory Java and supports Java 8 and later.
## Verify the Toolchain
@@ -32,11 +32,19 @@ java -version
## Object Serialization
-Add the Fory Kotlin library to the application module:
+The repositories below resolve release coordinates from Maven Central and `-SNAPSHOT` coordinates
+from the Apache snapshot repository. Keep every Fory module on the same version:
```kotlin title="build.gradle.kts"
+repositories {
+ maven("https://repository.apache.org/snapshots/") {
+ mavenContent { snapshotsOnly() }
+ }
+ mavenCentral()
+}
+
dependencies {
- implementation("org.apache.fory:fory-kotlin:1.6.1")
+ implementation("org.apache.fory:fory-kotlin:1.7.0-SNAPSHOT")
}
```
@@ -73,6 +81,34 @@ within the JVM Fory implementation family. Continue with
[xlang](../object-serialization/kotlin/basic-serialization.md#cross-language-interoperability), or
[native mode](../object-serialization/kotlin/native.md).
+## Standard JSON
+
+Fory JSON is a separate text format from binary Object Serialization. Add its optional Kotlin
+module when interoperating with ordinary JSON APIs, browsers, logs, or other JSON libraries:
+
+```kotlin title="build.gradle.kts"
+dependencies {
+ implementation("org.apache.fory:fory-json-kotlin:1.7.0-SNAPSHOT")
+}
+```
+
+```kotlin
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class User(val id: Long, val name: String)
+
+val json = ForyJsonKotlin.builder().build()
+val userType = jsonTypeRef<User>()
+val text = json.toJson(User(1, "Alice"), userType)
+val decoded = json.fromJson(text, userType)
+```
+
+The runtime reads Kotlin/JVM metadata directly. Add `fory-json-kotlin-ksp` only to Android builds
+that use R8 or ProGuard; it emits exact retention rules for Kotlin `@JsonType` models and
+source-owned exact Mixins. Native Image uses the normal `@ForyJsonProvider` workflow. Continue with
+[Kotlin JSON](../json/kotlin.md).
+
## Other Capabilities
- **Fory IDL and Compiler** generates Kotlin models and registration helpers through KSP. See [Compiler Getting Started](../compiler/getting-started.md) and the [Kotlin generated-code guide](../compiler/generated-code/kotlin.md).
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org