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/09/20 14:49:19 UTC
(fory-site) branch main updated: docs: publish Apache Fory 1.7.4 release (#511)
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
The following commit(s) were added to refs/heads/main by this push:
new af148ff3a61 docs: publish Apache Fory 1.7.4 release (#511)
af148ff3a61 is described below
commit af148ff3a611f630f14842e7723c497d94096352
Author: Shawn Yang <sh...@gmail.com>
AuthorDate: Sun Sep 20 22:49:14 2026 +0800
docs: publish Apache Fory 1.7.4 release (#511)
Publish the Apache Fory 1.7.4 release on the website: update
installation references and English/Chinese download pages, add
bilingual release articles, and synchronize the changed release
documentation into the existing 1.7.0 documentation line.
The documentation includes runtime Kotlin JSON type tokens, compatible
Java timestamp field types, and non-nullable field validation. The 34
changed English release documents match the voted `v1.7.4` source;
corresponding Chinese content and executable examples are aligned.
Current development documentation remains current, and older release
lines are unchanged.
Validation: full English/Chinese `npm run build`, focused markdownlint,
formatting and whitespace checks, and generated-page checks for the
homepage, documentation roots, blogs, downloads, integration guide and
timestamp anchors. The Kotlin example is identical in both articles and
the voted integration guide.
---
blog/2026-09-20-fory_1_7_4_released.md | 88 +++++++++++++++++++++
docs/compiler/build-integration.md | 2 +-
docs/compiler/cli.md | 2 +-
docs/grpc/csharp.md | 4 +-
docs/grpc/dart.md | 2 +-
docs/grpc/rust.md | 2 +-
docs/json/getting-started.md | 6 +-
docs/json/kotlin.md | 4 +-
docs/json/scala.md | 2 +-
docs/object-serialization/cpp/index.md | 8 +-
docs/object-serialization/csharp/index.md | 2 +-
docs/object-serialization/dart/index.md | 2 +-
docs/object-serialization/java/index.md | 4 +-
docs/object-serialization/kotlin/index.md | 4 +-
.../rust/basic-serialization.md | 2 +-
docs/object-serialization/rust/index.md | 8 +-
docs/object-serialization/scala/index.md | 2 +-
docs/row-format/java.md | 4 +-
docs/start/cpp.md | 2 +-
docs/start/csharp.md | 2 +-
docs/start/dart.md | 2 +-
docs/start/go.md | 2 +-
docs/start/java.md | 6 +-
docs/start/javascript.md | 4 +-
docs/start/kotlin.md | 4 +-
docs/start/python.md | 2 +-
docs/start/rust.md | 2 +-
docs/start/scala.md | 2 +-
docs/start/swift.md | 2 +-
.../2026-09-20-fory_1_7_4_released.md | 83 ++++++++++++++++++++
.../current/compiler/build-integration.md | 2 +-
.../current/compiler/cli.md | 2 +-
.../current/grpc/csharp.md | 4 +-
.../current/grpc/dart.md | 2 +-
.../current/grpc/rust.md | 2 +-
.../current/json/getting-started.md | 6 +-
.../current/json/index.md | 1 +
.../current/json/integration.md | 90 ++++++++++++++++++++++
.../current/json/kotlin.md | 8 +-
.../current/json/scala.md | 2 +-
.../current/json/troubleshooting.md | 1 +
.../current/object-serialization/cpp/index.md | 8 +-
.../current/object-serialization/csharp/index.md | 2 +-
.../current/object-serialization/dart/index.md | 2 +-
.../java/basic-serialization.md | 12 +++
.../current/object-serialization/java/index.md | 4 +-
.../object-serialization/java/schema-metadata.md | 3 +
.../current/object-serialization/kotlin/index.md | 4 +-
.../rust/basic-serialization.md | 2 +-
.../current/object-serialization/rust/index.md | 8 +-
.../current/object-serialization/scala/index.md | 2 +-
.../current/row-format/java.md | 4 +-
.../current/specification/xlang_type_mapping.md | 3 +
.../current/start/cpp.md | 2 +-
.../current/start/csharp.md | 2 +-
.../current/start/dart.md | 2 +-
.../current/start/go.md | 2 +-
.../current/start/java.md | 6 +-
.../current/start/javascript.md | 4 +-
.../current/start/kotlin.md | 4 +-
.../current/start/python.md | 2 +-
.../current/start/rust.md | 2 +-
.../current/start/scala.md | 2 +-
.../current/start/swift.md | 2 +-
.../version-1.7.0/compiler/build-integration.md | 2 +-
.../version-1.7.0/compiler/cli.md | 2 +-
.../version-1.7.0/grpc/csharp.md | 4 +-
.../version-1.7.0/grpc/dart.md | 2 +-
.../version-1.7.0/grpc/rust.md | 2 +-
.../version-1.7.0/json/getting-started.md | 6 +-
.../version-1.7.0/json/index.md | 39 +++++-----
.../version-1.7.0/json/integration.md | 85 ++++++++++++++++++++
.../version-1.7.0/json/kotlin.md | 8 +-
.../version-1.7.0/json/scala.md | 2 +-
.../version-1.7.0/json/troubleshooting.md | 43 ++++++-----
.../object-serialization/cpp/index.md | 8 +-
.../object-serialization/csharp/index.md | 2 +-
.../object-serialization/dart/index.md | 2 +-
.../java/basic-serialization.md | 12 +++
.../object-serialization/java/index.md | 4 +-
.../object-serialization/java/schema-metadata.md | 11 ++-
.../object-serialization/kotlin/index.md | 4 +-
.../rust/basic-serialization.md | 2 +-
.../object-serialization/rust/index.md | 8 +-
.../object-serialization/scala/index.md | 2 +-
.../version-1.7.0/row-format/java.md | 4 +-
.../specification/xlang_type_mapping.md | 3 +
.../version-1.7.0/start/cpp.md | 2 +-
.../version-1.7.0/start/csharp.md | 2 +-
.../version-1.7.0/start/dart.md | 2 +-
.../version-1.7.0/start/go.md | 2 +-
.../version-1.7.0/start/java.md | 6 +-
.../version-1.7.0/start/javascript.md | 4 +-
.../version-1.7.0/start/kotlin.md | 4 +-
.../version-1.7.0/start/python.md | 2 +-
.../version-1.7.0/start/rust.md | 2 +-
.../version-1.7.0/start/scala.md | 2 +-
.../version-1.7.0/start/swift.md | 2 +-
.../download/index.md | 12 +--
src/components/home/HomepageLanding.tsx | 24 +++---
src/pages/download/index.md | 12 +--
.../version-1.7.0/compiler/build-integration.md | 2 +-
versioned_docs/version-1.7.0/compiler/cli.md | 2 +-
versioned_docs/version-1.7.0/grpc/csharp.md | 4 +-
versioned_docs/version-1.7.0/grpc/dart.md | 2 +-
versioned_docs/version-1.7.0/grpc/rust.md | 2 +-
.../version-1.7.0/json/getting-started.md | 6 +-
versioned_docs/version-1.7.0/json/index.md | 1 +
versioned_docs/version-1.7.0/json/integration.md | 90 ++++++++++++++++++++++
versioned_docs/version-1.7.0/json/kotlin.md | 8 +-
versioned_docs/version-1.7.0/json/scala.md | 2 +-
.../version-1.7.0/json/troubleshooting.md | 43 ++++++-----
.../object-serialization/cpp/index.md | 8 +-
.../object-serialization/csharp/index.md | 2 +-
.../object-serialization/dart/index.md | 2 +-
.../java/basic-serialization.md | 15 ++++
.../object-serialization/java/index.md | 4 +-
.../object-serialization/java/schema-metadata.md | 4 +
.../object-serialization/kotlin/index.md | 4 +-
.../rust/basic-serialization.md | 2 +-
.../object-serialization/rust/index.md | 8 +-
.../object-serialization/scala/index.md | 2 +-
versioned_docs/version-1.7.0/row-format/java.md | 4 +-
.../specification/xlang_type_mapping.md | 3 +
versioned_docs/version-1.7.0/start/cpp.md | 2 +-
versioned_docs/version-1.7.0/start/csharp.md | 2 +-
versioned_docs/version-1.7.0/start/dart.md | 2 +-
versioned_docs/version-1.7.0/start/go.md | 2 +-
versioned_docs/version-1.7.0/start/java.md | 6 +-
versioned_docs/version-1.7.0/start/javascript.md | 4 +-
versioned_docs/version-1.7.0/start/kotlin.md | 4 +-
versioned_docs/version-1.7.0/start/python.md | 2 +-
versioned_docs/version-1.7.0/start/rust.md | 2 +-
versioned_docs/version-1.7.0/start/scala.md | 2 +-
versioned_docs/version-1.7.0/start/swift.md | 2 +-
135 files changed, 781 insertions(+), 269 deletions(-)
diff --git a/blog/2026-09-20-fory_1_7_4_released.md b/blog/2026-09-20-fory_1_7_4_released.md
new file mode 100644
index 00000000000..c48a7c59859
--- /dev/null
+++ b/blog/2026-09-20-fory_1_7_4_released.md
@@ -0,0 +1,88 @@
+---
+slug: fory_1_7_4_release
+title: Fory v1.7.4 Released
+description: "Fory 1.7.4 improves JSON performance, adds runtime Kotlin JSON type tokens, and fixes Java serialization edge cases."
+authors: [chaokunyang]
+tags: [fory, java, json, kotlin, scala]
+---
+
+Apache Fory 1.7.4 is now available. This release includes 9 pull requests from 2 contributors,
+with JSON performance improvements, runtime Kotlin type tokens for framework integration, and
+Java serialization fixes. See [Getting Started](/docs/start/) for installation instructions.
+
+## Highlights
+
+- Improve Java JSON reading and writing and Scala collection codecs.
+- Build Kotlin JSON type tokens from a runtime `KType`, preserving nested generic arguments and nullability.
+- Preserve declared registered field types during compatible Java deserialization, and validate null values in non-nullable fields.
+- Fix Unsafe address access under JDK 8 on ARM.
+
+## Runtime Kotlin JSON Type Tokens
+
+Framework callbacks often discover a request or response type at runtime. In 1.7.4,
+`jsonTypeRef<Any?>(kType)` lets an adapter retain that Kotlin declaration for both JSON reading
+and writing. The supplied `KType` determines the JSON type; `Any?` is only the callback's static
+view of the value.
+
+For example, retain the response type of a Kotlin controller method:
+
+```kotlin
+import java.io.OutputStream
+import kotlin.reflect.jvm.kotlinFunction
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class Employee(val id: Long, val name: String)
+data class Response<T>(val flag: Boolean, val data: T? = null, val msg: String? = null)
+
+class EmployeeController {
+ fun employees(): Response<List<Employee>> =
+ Response(true, listOf(Employee(1, "Alice")))
+}
+
+val json = ForyJsonKotlin.builder().build()
+val method = EmployeeController::class.java.getMethod("employees")
+val responseType = jsonTypeRef<Any?>(requireNotNull(method.kotlinFunction).returnType)
+
+fun writeResponse(value: Any?, output: OutputStream) {
+ json.writeJsonTo(value, responseType, output)
+}
+
+fun readResponse(bytes: ByteArray): Any? = json.fromJson(bytes, responseType)
+```
+
+Discover each type once and reuse its token. Kotlin reflection requires the application's
+`kotlin-reflect` dependency, with a version matching Kotlin. For wrapped HTTP responses,
+select the body type before creating the token. Unresolved type parameters, star projections,
+and contravariant projections remain unsupported.
+
+See [JSON framework integration](/docs/json/integration#kotlin-integration) for dependency
+setup, request conversion, and Spring MVC adapter requirements.
+
+## JSON Performance
+
+This release improves Java JSON scalar, string, array, and temporal read/write paths, along with
+Scala collection codecs. Applications use the same JSON APIs to benefit from these changes.
+The [JSON guide](/docs/json/) links to the existing benchmark reports and their measurement
+conditions.
+
+## Java Serialization Fixes
+
+Compatible deserialization now preserves registered declared field types. For timestamp fields,
+this includes retaining a declared `java.util.Date` or `java.sql.Date` rather than assigning an
+`Instant`. Dynamic xlang timestamp values still use `Instant`. See the
+[timestamp mapping](/docs/object-serialization/java/basic-serialization#timestamps) for precision
+and Java native-mode behavior.
+
+Serialization also rejects null values in fields whose encoding has neither a null nor a
+reference flag, with an error identifying the field. Mark nullable fields with `@Nullable`;
+for Java-only serialization, `Fory.builder().withXlang(false)` makes unannotated reference fields
+nullable by default. See [schema metadata](/docs/object-serialization/java/schema-metadata).
+
+The release also fixes JDK 8 ARM Unsafe address access and restores the dataclasses and gRPC
+license attributions in the distribution.
+
+The complete release notes are available on
+[GitHub](https://github.com/apache/fory/releases/tag/v1.7.4).
+
+**Full Changelog**: [v1.7.3...v1.7.4](https://github.com/apache/fory/compare/v1.7.3...v1.7.4)
diff --git a/docs/compiler/build-integration.md b/docs/compiler/build-integration.md
index 0cb05604c6f..d8becffd278 100644
--- a/docs/compiler/build-integration.md
+++ b/docs/compiler/build-integration.md
@@ -211,7 +211,7 @@ Add the Fory dependency to `pubspec.yaml`:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/docs/compiler/cli.md b/docs/compiler/cli.md
index 804c89034f4..f444d7cbd3f 100644
--- a/docs/compiler/cli.md
+++ b/docs/compiler/cli.md
@@ -689,5 +689,5 @@ fory = "x.y.z"
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
```
diff --git a/docs/grpc/csharp.md b/docs/grpc/csharp.md
index fbd4f4095f7..4b841523a60 100644
--- a/docs/grpc/csharp.md
+++ b/docs/grpc/csharp.md
@@ -39,7 +39,7 @@ Server project:
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.71.0" />
</ItemGroup>
```
@@ -48,7 +48,7 @@ Client project:
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.Core.Api" Version="2.71.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
</ItemGroup>
diff --git a/docs/grpc/dart.md b/docs/grpc/dart.md
index 669c9d94279..af6c82ae419 100644
--- a/docs/grpc/dart.md
+++ b/docs/grpc/dart.md
@@ -38,7 +38,7 @@ application that compiles or runs generated service companions:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
grpc: ^4.0.0
dev_dependencies:
diff --git a/docs/grpc/rust.md b/docs/grpc/rust.md
index fccfac10365..6558ca94943 100644
--- a/docs/grpc/rust.md
+++ b/docs/grpc/rust.md
@@ -37,7 +37,7 @@ to build streaming responses or request streams.
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
bytes = "1"
tonic = { version = "0.14", features = ["transport"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
diff --git a/docs/json/getting-started.md b/docs/json/getting-started.md
index 362173d52c5..18516d9d160 100644
--- a/docs/json/getting-started.md
+++ b/docs/json/getting-started.md
@@ -43,7 +43,7 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-json</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -57,7 +57,7 @@ repositories {
mavenCentral()
}
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
### Kotlin
@@ -66,7 +66,7 @@ Kotlin/JVM applications add the optional Kotlin JSON runtime and use its single
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/docs/json/kotlin.md b/docs/json/kotlin.md
index e45d3b36cee..1b75007d456 100644
--- a/docs/json/kotlin.md
+++ b/docs/json/kotlin.md
@@ -41,7 +41,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
@@ -54,7 +54,7 @@ plugins {
}
dependencies {
- ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.3")
+ ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.4")
}
```
diff --git a/docs/json/scala.md b/docs/json/scala.md
index f3a9b8c48b7..f24277a2034 100644
--- a/docs/json/scala.md
+++ b/docs/json/scala.md
@@ -25,7 +25,7 @@ module works on the ordinary JVM and GraalVM Native Image. Android is not suppor
## Setup
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.4"
```
`ForyJsonScala.builder()` installs the Scala module and returns the standard Fory JSON builder:
diff --git a/docs/object-serialization/cpp/index.md b/docs/object-serialization/cpp/index.md
index cc2f7630058..66050e74a32 100644
--- a/docs/object-serialization/cpp/index.md
+++ b/docs/object-serialization/cpp/index.md
@@ -62,7 +62,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
@@ -92,11 +92,11 @@ module(
bazel_dep(name = "rules_cc", version = "0.1.1")
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
git_override(
module_name = "fory",
remote = "https://github.com/apache/fory.git",
- commit = "v1.7.3", # Or use a specific commit hash for reproducibility
+ commit = "v1.7.4", # Or use a specific commit hash for reproducibility
)
```
@@ -128,7 +128,7 @@ bazel run //:my_app
For local development, you can use `local_path_override` instead:
```bazel
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
local_path_override(
module_name = "fory",
path = "/path/to/fory",
diff --git a/docs/object-serialization/csharp/index.md b/docs/object-serialization/csharp/index.md
index 957a2dabfd9..603deff64d8 100644
--- a/docs/object-serialization/csharp/index.md
+++ b/docs/object-serialization/csharp/index.md
@@ -46,7 +46,7 @@ Reference the single `Apache.Fory` package. It includes the Fory library and the
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
</ItemGroup>
```
diff --git a/docs/object-serialization/dart/index.md b/docs/object-serialization/dart/index.md
index a08544d4dc2..ca9d6cc2ef6 100644
--- a/docs/object-serialization/dart/index.md
+++ b/docs/object-serialization/dart/index.md
@@ -47,7 +47,7 @@ Add the dependency to your `pubspec.yaml`:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/docs/object-serialization/java/index.md b/docs/object-serialization/java/index.md
index 6fbdd473af3..69d11b0e08c 100644
--- a/docs/object-serialization/java/index.md
+++ b/docs/object-serialization/java/index.md
@@ -63,7 +63,7 @@ or later.
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -71,7 +71,7 @@ or later.
```kotlin
// Binary object serialization
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
#### JDK 25 and Later
diff --git a/docs/object-serialization/kotlin/index.md b/docs/object-serialization/kotlin/index.md
index 60115989466..a5ba5e61b47 100644
--- a/docs/object-serialization/kotlin/index.md
+++ b/docs/object-serialization/kotlin/index.md
@@ -53,14 +53,14 @@ See [Java Features](../java/index.md#features) for complete feature list.
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
### Gradle
```kotlin
-implementation("org.apache.fory:fory-kotlin:1.7.3")
+implementation("org.apache.fory:fory-kotlin:1.7.4")
```
### JDK25+
diff --git a/docs/object-serialization/rust/basic-serialization.md b/docs/object-serialization/rust/basic-serialization.md
index d9b0e178274..b26fe0c1cb7 100644
--- a/docs/object-serialization/rust/basic-serialization.md
+++ b/docs/object-serialization/rust/basic-serialization.md
@@ -147,7 +147,7 @@ let later = timestamp.checked_add_duration(duration)?;
```toml
[dependencies]
-fory = { version = "1.7.3", features = ["chrono"] }
+fory = { version = "1.7.4", features = ["chrono"] }
```
### Custom Types
diff --git a/docs/object-serialization/rust/index.md b/docs/object-serialization/rust/index.md
index 19f7b236e4f..eaba9f73a52 100644
--- a/docs/object-serialization/rust/index.md
+++ b/docs/object-serialization/rust/index.md
@@ -37,9 +37,9 @@ The Rust implementation provides versatile and high-performance serialization wi
| Crate | Description | Version |
| --------------------------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------- |
-| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | User-facing API, public Fory types, and derive macros | [1.7.3](https://crates.io/crates/fory) |
-| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | Lower-level core crate for advanced integrations | [1.7.3](https://crates.io/crates/fory-core) |
-| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | Procedural macro crate for direct derive-macro use | [1.7.3](https://crates.io/crates/fory-derive) |
+| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | User-facing API, public Fory types, and derive macros | [1.7.4](https://crates.io/crates/fory) |
+| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | Lower-level core crate for advanced integrations | [1.7.4](https://crates.io/crates/fory-core) |
+| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | Procedural macro crate for direct derive-macro use | [1.7.4](https://crates.io/crates/fory-derive) |
Most applications should depend on `fory` only. It re-exports the derive
macros and the public Fory types needed by generated code. Use `fory-core`
@@ -52,7 +52,7 @@ Add Apache Fory™ to your `Cargo.toml`:
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
### Basic Example
diff --git a/docs/object-serialization/scala/index.md b/docs/object-serialization/scala/index.md
index d9908b1cfe6..edc61814969 100644
--- a/docs/object-serialization/scala/index.md
+++ b/docs/object-serialization/scala/index.md
@@ -49,7 +49,7 @@ See [Java Features](../java/index.md#features) for complete feature list.
Add the dependency with sbt:
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
### JDK25+
diff --git a/docs/row-format/java.md b/docs/row-format/java.md
index 0349bc95e9b..846df1db7ef 100644
--- a/docs/row-format/java.md
+++ b/docs/row-format/java.md
@@ -43,14 +43,14 @@ For Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-format</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
For Gradle:
```kotlin
-implementation("org.apache.fory:fory-format:1.7.3")
+implementation("org.apache.fory:fory-format:1.7.4")
```
## Basic Usage
diff --git a/docs/start/cpp.md b/docs/start/cpp.md
index aeeff27abf3..9efa5a1b97d 100644
--- a/docs/start/cpp.md
+++ b/docs/start/cpp.md
@@ -45,7 +45,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
diff --git a/docs/start/csharp.md b/docs/start/csharp.md
index 94df569c9e4..5562e6372a6 100644
--- a/docs/start/csharp.md
+++ b/docs/start/csharp.md
@@ -36,7 +36,7 @@ Create a console project and add the released package:
```bash
dotnet new console -n ForyExample
cd ForyExample
-dotnet add package Apache.Fory --version 1.7.3
+dotnet add package Apache.Fory --version 1.7.4
```
Replace `Program.cs` with:
diff --git a/docs/start/dart.md b/docs/start/dart.md
index 01b1335c4de..d301e6d90d5 100644
--- a/docs/start/dart.md
+++ b/docs/start/dart.md
@@ -36,7 +36,7 @@ Add Fory and the generator to `pubspec.yaml`:
```yaml
dependencies:
- fory: 1.7.3
+ fory: 1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/docs/start/go.md b/docs/start/go.md
index 3dbe1df99b8..159215aec82 100644
--- a/docs/start/go.md
+++ b/docs/start/go.md
@@ -38,7 +38,7 @@ Create a module and install the released Fory module:
mkdir fory-example
cd fory-example
go mod init example.com/fory-example
-go get github.com/apache/fory/go/fory@v1.7.3
+go get github.com/apache/fory/go/fory@v1.7.4
```
If a Go proxy has not picked up a new submodule tag yet, retry later or use
diff --git a/docs/start/java.md b/docs/start/java.md
index 907631e9eb0..0f3561ad712 100644
--- a/docs/start/java.md
+++ b/docs/start/java.md
@@ -44,14 +44,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
Run this complete xlang round trip:
@@ -97,7 +97,7 @@ Fory JSON maps Java objects to standard JSON text and UTF-8 bytes. Add
`fory-json` instead of `fory-core` when the application only needs JSON:
```kotlin
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
Add the import to `ForyExample.java`:
diff --git a/docs/start/javascript.md b/docs/start/javascript.md
index 1fee9709c59..61f35e43161 100644
--- a/docs/start/javascript.md
+++ b/docs/start/javascript.md
@@ -36,7 +36,7 @@ npm --version
Install the core package:
```bash
-npm install @apache-fory/core@1.7.3
+npm install @apache-fory/core@1.7.4
```
Define a schema and run an xlang round trip:
@@ -72,7 +72,7 @@ JavaScript uses xlang mode. Continue with
For the optional Node.js string fast path, install the matching package version:
```bash
-npm install @apache-fory/core@1.7.3 @apache-fory/hps@1.7.3
+npm install @apache-fory/core@1.7.4 @apache-fory/hps@1.7.4
```
## Other Capabilities
diff --git a/docs/start/kotlin.md b/docs/start/kotlin.md
index 9775d65b8ef..7230f96810e 100644
--- a/docs/start/kotlin.md
+++ b/docs/start/kotlin.md
@@ -44,7 +44,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-kotlin:1.7.4")
}
```
@@ -88,7 +88,7 @@ module when interoperating with ordinary JSON APIs, browsers, logs, or other JSO
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/docs/start/python.md b/docs/start/python.md
index b4ec2096206..98edf7f3867 100644
--- a/docs/start/python.md
+++ b/docs/start/python.md
@@ -35,7 +35,7 @@ python -m pip --version
Install the released package:
```bash
-python -m pip install pyfory==1.7.3
+python -m pip install pyfory==1.7.4
```
Run an xlang round trip:
diff --git a/docs/start/rust.md b/docs/start/rust.md
index 07077d77abd..0ff8cc25a0a 100644
--- a/docs/start/rust.md
+++ b/docs/start/rust.md
@@ -36,7 +36,7 @@ Add the public crate:
```toml title="Cargo.toml"
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
```rust
diff --git a/docs/start/scala.md b/docs/start/scala.md
index c57d548cdfe..24404d1f196 100644
--- a/docs/start/scala.md
+++ b/docs/start/scala.md
@@ -37,7 +37,7 @@ Add the Fory Scala library to `build.sbt`:
```sbt
ThisBuild / scalaVersion := "3.3.1"
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
Create `src/main/scala/ScalaExample.scala`:
diff --git a/docs/start/swift.md b/docs/start/swift.md
index eed11e9d477..ae515626c4a 100644
--- a/docs/start/swift.md
+++ b/docs/start/swift.md
@@ -42,7 +42,7 @@ Add the released package and depend on its `Fory` library in the generated `Pack
```swift title="Package.swift"
dependencies: [
- .package(url: "https://github.com/apache/fory.git", exact: "1.7.3")
+ .package(url: "https://github.com/apache/fory.git", exact: "1.7.4")
],
targets: [
.executableTarget(
diff --git a/i18n/zh-CN/docusaurus-plugin-content-blog/2026-09-20-fory_1_7_4_released.md b/i18n/zh-CN/docusaurus-plugin-content-blog/2026-09-20-fory_1_7_4_released.md
new file mode 100644
index 00000000000..356130d9339
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-blog/2026-09-20-fory_1_7_4_released.md
@@ -0,0 +1,83 @@
+---
+slug: fory_1_7_4_release
+title: Fory v1.7.4 发布
+description: "Fory 1.7.4 提升 JSON 性能,新增运行时 Kotlin JSON 类型令牌,并修复 Java 序列化边界问题。"
+authors: [chaokunyang]
+tags: [fory, java, json, kotlin, scala]
+---
+
+Apache Fory 1.7.4 已发布。本次发布包含 2 位贡献者提交的 9 个 PR,涵盖 JSON 性能优化、
+用于框架集成的运行时 Kotlin 类型令牌,以及 Java 序列化修复。
+安装方式请参阅[快速开始](/zh-CN/docs/start/)。
+
+## 主要更新
+
+- 优化 Java JSON 读写和 Scala 集合编解码器。
+- 从运行时 `KType` 构造 Kotlin JSON 类型令牌,保留嵌套泛型参数和可空性。
+- Java 兼容模式反序列化保留已注册字段的声明类型,并在序列化时校验不可空字段中的 null 值。
+- 修复 JDK 8 ARM 平台上的 Unsafe 地址访问问题。
+
+## 运行时 Kotlin JSON 类型令牌
+
+框架回调通常在运行时才能确定请求或响应的类型。1.7.4 提供
+`jsonTypeRef<Any?>(kType)`,让适配器在 JSON 读写时保留完整 Kotlin 声明。
+传入的 `KType` 决定 JSON 类型;`Any?` 只是回调中值的静态视图。
+
+例如,可以保留 Kotlin 控制器方法的响应类型:
+
+```kotlin
+import java.io.OutputStream
+import kotlin.reflect.jvm.kotlinFunction
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class Employee(val id: Long, val name: String)
+data class Response<T>(val flag: Boolean, val data: T? = null, val msg: String? = null)
+
+class EmployeeController {
+ fun employees(): Response<List<Employee>> =
+ Response(true, listOf(Employee(1, "Alice")))
+}
+
+val json = ForyJsonKotlin.builder().build()
+val method = EmployeeController::class.java.getMethod("employees")
+val responseType = jsonTypeRef<Any?>(requireNotNull(method.kotlinFunction).returnType)
+
+fun writeResponse(value: Any?, output: OutputStream) {
+ json.writeJsonTo(value, responseType, output)
+}
+
+fun readResponse(bytes: ByteArray): Any? = json.fromJson(bytes, responseType)
+```
+
+每个类型只需发现一次,并复用对应类型令牌。Kotlin 反射需要应用添加与 Kotlin 版本匹配的
+`kotlin-reflect` 依赖。对于包装后的 HTTP 响应,应先选取消息体类型,再创建令牌。
+未解析的类型参数、星投影和逆变投影仍不受支持。
+
+依赖配置、请求转换和 Spring MVC 适配要求见
+[JSON 框架集成](/zh-CN/docs/json/integration#kotlin-integration)。
+
+## JSON 性能优化
+
+本次发布优化了 Java JSON 标量、字符串、数组和时间类型的读写路径,以及 Scala 集合编解码器。
+应用继续使用现有 JSON API 即可使用这些优化。
+[JSON 指南](/zh-CN/docs/json/)提供现有基准测试报告及其测量条件。
+
+## Java 序列化修复
+
+兼容模式反序列化现在会保留已注册字段的声明类型。对于时间戳字段,声明为
+`java.util.Date` 或 `java.sql.Date` 的字段会保留对应类型,不再被赋予 `Instant`。
+动态 xlang 时间戳值仍使用 `Instant`。精度和 Java 原生模式行为见
+[时间戳映射](/zh-CN/docs/object-serialization/java/basic-serialization#timestamps)。
+
+当字段的编码既没有 null 标志也没有引用标志时,序列化会拒绝其中的 null 值,并在错误中指出字段。
+允许为空的字段应标注 `@Nullable`;对于仅在 Java 中使用的序列化,
+`Fory.builder().withXlang(false)` 会让未标注的引用字段默认可空。
+详见 [Schema 元数据](/zh-CN/docs/object-serialization/java/schema-metadata)。
+
+本次发布还修复了 JDK 8 ARM 平台的 Unsafe 地址访问问题,并恢复了分发包中的 dataclasses
+和 gRPC 许可归属说明。
+
+完整发布说明见 [GitHub](https://github.com/apache/fory/releases/tag/v1.7.4)。
+
+**完整变更记录**:[v1.7.3...v1.7.4](https://github.com/apache/fory/compare/v1.7.3...v1.7.4)
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/build-integration.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/build-integration.md
index 49453322e7d..679635fdf68 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/build-integration.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/build-integration.md
@@ -211,7 +211,7 @@ cc_library(
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/cli.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/cli.md
index e08529951f4..46d1757ec97 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/cli.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compiler/cli.md
@@ -659,5 +659,5 @@ fory = "x.y.z"
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/csharp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/csharp.md
index 4e2ed5b4807..fe98f7d0dea 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/csharp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/csharp.md
@@ -36,7 +36,7 @@ gRPC 客户端、服务基类、方法描述符、元数据、截止时间、取
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.71.0" />
</ItemGroup>
```
@@ -45,7 +45,7 @@ gRPC 客户端、服务基类、方法描述符、元数据、截止时间、取
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.Core.Api" Version="2.71.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
</ItemGroup>
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/dart.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/dart.md
index 2f3f602d2cd..e820d9ef72f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/dart.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/dart.md
@@ -29,7 +29,7 @@ license: |
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
grpc: ^4.0.0
dev_dependencies:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/rust.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/rust.md
index 77c403b912e..fef383ec3bb 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/rust.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/grpc/rust.md
@@ -29,7 +29,7 @@ license: |
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
bytes = "1"
tonic = { version = "0.14", features = ["transport"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/getting-started.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/getting-started.md
index d8fddcd82d2..707349a37fb 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/getting-started.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/getting-started.md
@@ -41,7 +41,7 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-json</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -55,7 +55,7 @@ repositories {
mavenCentral()
}
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
### Kotlin
@@ -64,7 +64,7 @@ Kotlin/JVM 应用添加可选的 Kotlin JSON 运行时,并使用其统一 buil
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/index.md
index 03d2c98e7f5..ec4df77c803 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/index.md
@@ -30,6 +30,7 @@ Fory JSON 与 Fory 的 native 和 xlang 二进制协议是不同的数据格式
| 目标 | 页面 |
| --------------------------------------------------------------- | ---------------------------------- |
| 运行第一个 JSON 往返示例 | [快速开始](getting-started.md) |
+| 集成 Spring 和 Kotlin 框架回调 | [框架集成](integration.md) |
| 了解 Java 对象映射和配置 | [对象映射](object-mapping.md) |
| 配置属性、creator、值、validator 和 Mixin | [注解](annotations.md) |
| 扩展完整值、子值和 Map 键 | [自定义 Codec](custom-codecs.md) |
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/integration.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/integration.md
new file mode 100644
index 00000000000..1af3955de6a
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/integration.md
@@ -0,0 +1,90 @@
+---
+title: Integration
+sidebar_position: 13
+id: integration
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+## Spring Fory
+
+[spring-fory](https://github.com/chaokunyang/spring-fory) provides Spring MVC message converters,
+Spring WebFlux codecs, and Spring Boot auto-configuration starters for Fory JSON. It supports
+ordinary JSON request and response bodies, with streaming JSON and NDJSON support in WebFlux.
+
+See the project's [installation and usage guide](https://github.com/chaokunyang/spring-fory#installation)
+to select the adapter or starter matching your Spring version and configure your application.
+
+## Kotlin integration
+
+Use `jsonTypeRef<Any?>(kType)` when a framework supplies a Kotlin `KType` at runtime and the
+callback cannot use a reified type argument. The supplied `KType` determines the complete JSON
+type, including nested generic arguments and nullability. `Any?` is only the callback's static
+view of the value; it does not replace the supplied type with a dynamic JSON schema.
+
+Obtaining a `KType` from a Kotlin function or a Java `Method` requires the application's
+`kotlin-reflect` dependency. Match its version to the application's Kotlin version:
+
+```kotlin
+dependencies {
+ implementation(kotlin("reflect"))
+}
+```
+
+For example, discover and retain a controller method's response type:
+
+```kotlin
+import java.io.OutputStream
+import kotlin.reflect.jvm.kotlinFunction
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class Employee(val id: Long, val name: String)
+data class Response<T>(val flag: Boolean, val data: T? = null, val msg: String? = null)
+
+class EmployeeController {
+ fun employees(): Response<List<Employee>> =
+ Response(true, listOf(Employee(1, "Alice")))
+}
+
+val json = ForyJsonKotlin.builder().build()
+val method = EmployeeController::class.java.getMethod("employees")
+val responseType = jsonTypeRef<Any?>(requireNotNull(method.kotlinFunction).returnType)
+
+fun writeResponse(value: Any?, output: OutputStream) {
+ json.writeJsonTo(value, responseType, output)
+}
+
+fun readResponse(bytes: ByteArray): Any? = json.fromJson(bytes, responseType)
+```
+
+Discover each declared type once and reuse its token. For request bodies, obtain the corresponding
+Kotlin value parameter's `KType`. A method with unresolved type parameters still needs its concrete
+type arguments before conversion; star projections and contravariant projections remain unsupported.
+If you select a static type more specific than `Any?`, the caller must ensure it matches the
+supplied `KType`.
+
+For Spring MVC, retain the controller's Kotlin declaration when adapting the request or response
+to a converter. A `SmartHttpMessageConverter` can receive application-provided read/write hints
+containing that `KType` or its Fory type token. When an HTTP wrapper such as
+`ResponseEntity<Response<List<Employee>>>` is present, select the body type
+`Response<List<Employee>>` before constructing the token.
+
+An `AbstractHttpMessageConverter` callback that supplies only the runtime object loses generic
+arguments. `AbstractGenericHttpMessageConverter` preserves Java generics, but
+`TypeRef.of(javaType)` does not restore Kotlin nullability. Neither a Java `Type` nor the runtime
+value alone can recover the full Kotlin declaration. Use `jsonTypeRef(kType)` after obtaining that
+declaration; this API does not automatically install a Spring converter.
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/kotlin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/kotlin.md
index d4a621ecc7e..a6b3f221006 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/kotlin.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/kotlin.md
@@ -38,7 +38,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
@@ -50,7 +50,7 @@ plugins {
}
dependencies {
- ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.3")
+ ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.4")
}
```
@@ -95,6 +95,10 @@ val json = ForyJson.builder().withModule(ForyJsonKotlin).build()
不会按类路径自动安装模块,也没有 Kotlin 专用的编码/解码别名。
+当框架回调在运行时提供 Kotlin `KType` 时,请使用 `jsonTypeRef<Any?>(kType)`。
+控制器类型发现、请求和响应转换以及 Spring MVC 适配要求见
+[Kotlin 集成](integration.md#kotlin-integration)。
+
## 不可变类与编译器默认值 {#immutable-classes-and-compiler-defaults}
普通类或 data class 映射为具有命名属性的 JSON 对象。Fory 选择一个有效的公共 Kotlin 构造函数以及可重建的属性;`copy` 和 `componentN` 函数不参与定义 Schema。只有 JSON 成员缺失时,才使用编译器生成的默认值:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/scala.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/scala.md
index a3c0f3dadb6..b1c0a5aa7cd 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/scala.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/scala.md
@@ -24,7 +24,7 @@ Fory JSON 通过可选的 `fory-json-scala` 制品支持 Scala 2.13 和 Scala 3
## 设置 {#setup}
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.4"
```
`ForyJsonScala.builder()` 安装 Scala 模块并返回标准 Fory JSON builder:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/troubleshooting.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/troubleshooting.md
index 6965756676c..d161691555e 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/troubleshooting.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/json/troubleshooting.md
@@ -37,6 +37,7 @@ license: |
| OutputStream 写入失败 | 底层 `IOException` 被包装为 `ForyJsonException` 的 cause |
| Kotlin null 或成员缺失导致失败 | 检查精确的 `jsonTypeRef`、构造函数默认值和可空使用位置;null 不会请求编译器默认值 |
| Kotlin 原始泛型、星投影或类型投影失败 | 提供完整的 `jsonTypeRef<T>()`;`in` 和星投影无法重建一个精确 Schema |
+| 框架转换器中的 Kotlin 泛型转换失败 | 保留声明的 Kotlin `KType` 并使用 `jsonTypeRef<Any?>(kType)`;Java 的 `TypeRef.of(type)` 无法恢复 Kotlin 可空性。参见[框架集成](integration.md#kotlin-integration) |
| 不支持的 Kotlin 元数据 | 确保解析到的 `kotlin-metadata-jvm` 支持模型编译器的元数据,并且经过验证的 JVM 成员与元数据匹配 |
| Kotlin 模型在 Android 代码压缩后失败 | 启用 KSP;精确 Mixin 的来源或目标任一为 Kotlin 时均需使用,并验证生成的规则已打包 |
| Native Image 中缺少 Kotlin 模型 | 从可达的 `ForyJsonProvider` 安装 `ForyJsonKotlin`,启用代码生成,并使精确绑定从该配置可达 |
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/cpp/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/cpp/index.md
index e184535818c..eeb42eb4a24 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/cpp/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/cpp/index.md
@@ -60,7 +60,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
@@ -90,11 +90,11 @@ module(
bazel_dep(name = "rules_cc", version = "0.1.1")
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
git_override(
module_name = "fory",
remote = "https://github.com/apache/fory.git",
- commit = "v1.7.3", # Or use a specific commit hash for reproducibility
+ commit = "v1.7.4", # Or use a specific commit hash for reproducibility
)
```
@@ -125,7 +125,7 @@ bazel run //:my_app
本地开发时,可以改用 `local_path_override`:
```bazel
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
local_path_override(
module_name = "fory",
path = "/path/to/fory",
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/csharp/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/csharp/index.md
index af0cfac92d7..a5df62f5474 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/csharp/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/csharp/index.md
@@ -44,7 +44,7 @@ Apache Fory™ C# 是面向 .NET 的高性能跨语言序列化库。它支持
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
</ItemGroup>
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/dart/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/dart/index.md
index 43bb226b51e..f65567dd5e5 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/dart/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/dart/index.md
@@ -44,7 +44,7 @@ Apache Fory™ Dart 可以将 Dart 对象序列化为字节并反序列化,也
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/basic-serialization.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/basic-serialization.md
index 7c3818651aa..5b11e9575ca 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/basic-serialization.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/basic-serialization.md
@@ -265,6 +265,18 @@ byte[] bytes = fory.serialize(node1);
- 除非每种目标语言都有约定的映射,否则避免使用 `Optional`、`BigDecimal` 和 `EnumSet` 等 Java 专用类型。
- 完整兼容性矩阵参见[类型映射指南](../../specification/xlang_type_mapping.md)。
+#### 时间戳 {#timestamps}
+
+在 xlang 模式(`withXlang(true)`)下,`java.util.Date` 和 `java.sql.Date` 与 `java.time.Instant`
+一样使用 `timestamp` 类型:先写入 8 字节的秒数,再写入 4 字节的纳秒数。声明为 `Date` 的字段保留
+对应的 Java 类型。未声明字段类型的时间戳,例如动态根值,读取后返回 `Instant`。
+
+`Date` 值保留毫秒精度。将时间戳读为 `Date` 时,会向下取整到前一个毫秒,舍弃亚毫秒精度。
+超出有符号 64 位毫秒范围的时间戳无法表示为 `Date`。
+
+在 Java 原生模式(`withXlang(false)`)下,`java.util.Date` 和 `java.sql.Date` 将 Unix 纪元以来的
+毫秒数编码为 8 字节有符号整数。反序列化会保留原始 Java 类型,根值也不例外。
+
#### 列表与稠密数组
Java 原始类型数组是稠密 `array<T>` 载体,但普通 `byte[]` 默认映射为 `bytes`。常规 Java 集合以及 `Int32List`、`Float16List`、`BFloat16List` 等 Fory 原始类型列表载体使用 `list<T>`,除非字段具有显式 `@ArrayType` 元数据。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/index.md
index 10c783a23d2..08b5d652a42 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/index.md
@@ -51,7 +51,7 @@ Fory core 支持 Java 8 及更高版本。Java Record 序列化需要 Java 17
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -59,7 +59,7 @@ Fory core 支持 Java 8 及更高版本。Java Record 序列化需要 Java 17
```kotlin
// Binary object serialization
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
#### JDK 25 及更高版本
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/schema-metadata.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/schema-metadata.md
index 6d39d129319..4cfa6859f74 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/schema-metadata.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/java/schema-metadata.md
@@ -163,6 +163,9 @@ public class Record {
- 字段不可空时,Fory 会跳过 null 标志的写入。
- 可为 null 的装箱类型(`Integer`、`Long` 等)应使用 `@Nullable`。
+如果没有 null 或引用标志的字段包含 null,序列化会失败。错误会指出具体字段,并建议使用 `@Nullable`。
+对于仅在 Java 中使用的序列化,可通过 `Fory.builder().withXlang(false)` 让未标注的引用字段默认可空。
+
## 引用跟踪(`@Ref`)
可能共享或形成循环的字段应启用引用跟踪:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/kotlin/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/kotlin/index.md
index 57c2f0e0c15..859cca86658 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/kotlin/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/kotlin/index.md
@@ -53,14 +53,14 @@ Fory Kotlin 继承了 Fory Java 的全部功能,并增加了 Kotlin 特有优
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
### Gradle
```kotlin
-implementation("org.apache.fory:fory-kotlin:1.7.3")
+implementation("org.apache.fory:fory-kotlin:1.7.4")
```
### JDK25+
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/basic-serialization.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/basic-serialization.md
index 3736d8c3e4a..44f3a9f44e7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/basic-serialization.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/basic-serialization.md
@@ -145,7 +145,7 @@ Rust 启用 `chrono::NaiveDate`、`chrono::NaiveDateTime` 和 `chrono::Duration`
```toml
[dependencies]
-fory = { version = "1.7.3", features = ["chrono"] }
+fory = { version = "1.7.4", features = ["chrono"] }
```
### 自定义类型
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/index.md
index 2696cc72bba..0b87858fd4e 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/rust/index.md
@@ -36,9 +36,9 @@ Rust 实现通过自动内存管理和编译期类型安全提供灵活的高性
| Crate | 说明 | 版本 |
| --------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------- |
-| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | 面向用户的 API、运行时类型和派生宏 | [1.7.3](https://crates.io/crates/fory) |
-| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | 用于高级集成的底层运行时 crate | [1.7.3](https://crates.io/crates/fory-core) |
-| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | 供直接使用运行时的底层过程宏 crate | [1.7.3](https://crates.io/crates/fory-derive) |
+| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | 面向用户的 API、运行时类型和派生宏 | [1.7.4](https://crates.io/crates/fory) |
+| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | 用于高级集成的底层运行时 crate | [1.7.4](https://crates.io/crates/fory-core) |
+| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | 供直接使用运行时的底层过程宏 crate | [1.7.4](https://crates.io/crates/fory-derive) |
大多数应用程序只需依赖 `fory`。它重新导出生成代码所需的派生宏和公共运行时类型。只有明确要基于底层运行时 crate 构建时,才直接使用 `fory-core` 或 `fory-derive`。
@@ -48,7 +48,7 @@ Rust 实现通过自动内存管理和编译期类型安全提供灵活的高性
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
### 基本示例
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/scala/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/scala/index.md
index 035a4c3fc8e..346142449b6 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/scala/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/object-serialization/scala/index.md
@@ -49,7 +49,7 @@ Fory Scala 继承了 Fory Java 的全部功能,并增加了 Scala 特有优化
使用 sbt 添加依赖:
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
### JDK25+
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/row-format/java.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/row-format/java.md
index 0df3fa8d21a..0465d4d19a8 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/row-format/java.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/row-format/java.md
@@ -41,14 +41,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-format</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-format:1.7.3")
+implementation("org.apache.fory:fory-format:1.7.4")
```
## 基本用法
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/specification/xlang_type_mapping.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/specification/xlang_type_mapping.md
index fff7dca8981..799441b85d7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/specification/xlang_type_mapping.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/specification/xlang_type_mapping.md
@@ -117,6 +117,9 @@ license: |
- Python 的 `pyfory.Float16` 和 `pyfory.BFloat16` 是预留的注解标记;标量值反序列化为 Python 原生 `float`。
- Python 的 `BoolArray`、`Int8Array`、`Int16Array`、`Int32Array`、`Int64Array`、`UInt8Array`、`UInt16Array`、`UInt32Array`、`UInt64Array`、`Float16Array`、`BFloat16Array`、`Float32Array` 和 `Float64Array` 是公开的稠密数组包装器,具有类似列表的序列行为。
- JavaScript 的 `BoolArray`、回退实现 `Float16Array` 和 `BFloat16Array` 是基于 `Uint8Array` 或 `Uint16Array` 的公开稠密数组包装器。`float16` 和 `bfloat16` 标量值使用 `number`。原生支持 `Float16Array` 的 JavaScript 环境可以为 `array<float16>` 返回该原生载体。
+- Java 的 `java.util.Date` 和 `java.sql.Date` 也映射到 `timestamp`,使用秒数和纳秒数。
+ 声明类型的字段保留其 Java 载体类型;动态时间戳使用 `Instant`。
+ Date 载体保留毫秒精度,读取时间戳时向下取整到毫秒。
- Java 中不带注解的 `byte[]` 映射到 `binary`。数值字节数组使用类型使用位置注解:
`@Int8Type byte[]` 用于 `array<int8>`,`@UInt8Type byte[]` 用于 `array<uint8>`。
- Dart 使用 `double` 加 `Float16Type` 或 `Bfloat16Type` 元数据表示 `float16` 和 `bfloat16`
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/cpp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/cpp.md
index eaf1881fc57..2c92b3c4bee 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/cpp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/cpp.md
@@ -42,7 +42,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/csharp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/csharp.md
index 65d47a3f894..ace1178f76f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/csharp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/csharp.md
@@ -34,7 +34,7 @@ dotnet --version
```bash
dotnet new console -n ForyExample
cd ForyExample
-dotnet add package Apache.Fory --version 1.7.3
+dotnet add package Apache.Fory --version 1.7.4
```
将 `Program.cs` 替换为:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/dart.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/dart.md
index 0c4af43826c..92cbac79ade 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/dart.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/dart.md
@@ -34,7 +34,7 @@ dart pub --help
```yaml
dependencies:
- fory: 1.7.3
+ fory: 1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/go.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/go.md
index 957a6694c55..cd890b8e6c7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/go.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/go.md
@@ -36,7 +36,7 @@ go env GOPROXY
mkdir fory-example
cd fory-example
go mod init example.com/fory-example
-go get github.com/apache/fory/go/fory@v1.7.3
+go get github.com/apache/fory/go/fory@v1.7.4
```
如果 Go proxy 尚未收录新的 submodule tag,请稍后重试,或者暂时使用 `GOPROXY=direct`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/java.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/java.md
index d515e7e42b9..ecbdc93b759 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/java.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/java.md
@@ -39,14 +39,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
运行下面完整的 xlang 往返示例:
@@ -85,7 +85,7 @@ public final class ForyExample {
Fory JSON 将 Java 对象映射为标准 JSON 文本和 UTF-8 字节。如果应用只需要 JSON,请添加 `fory-json`,无需添加 `fory-core`:
```kotlin
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
在 `ForyExample.java` 中添加 import:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/javascript.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/javascript.md
index 22f3a489609..17faace8091 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/javascript.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/javascript.md
@@ -33,7 +33,7 @@ npm --version
安装 core 软件包:
```bash
-npm install @apache-fory/core@1.7.3
+npm install @apache-fory/core@1.7.4
```
定义 Schema 并运行 xlang 往返示例:
@@ -65,7 +65,7 @@ JavaScript 使用 xlang 模式。接下来可阅读 [JavaScript/TypeScript 对
若要使用可选的 Node.js 字符串快速路径,请安装版本匹配的软件包:
```bash
-npm install @apache-fory/core@1.7.3 @apache-fory/hps@1.7.3
+npm install @apache-fory/core@1.7.4 @apache-fory/hps@1.7.4
```
## 其他能力
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/kotlin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/kotlin.md
index 94cb9ff4972..386bf872eca 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/kotlin.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/kotlin.md
@@ -42,7 +42,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-kotlin:1.7.4")
}
```
@@ -81,7 +81,7 @@ Fory JSON 是独立于二进制对象序列化的文本格式。与普通 JSON A
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/python.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/python.md
index a8d02cefce3..732da72f1e4 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/python.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/python.md
@@ -33,7 +33,7 @@ python -m pip --version
安装已发布的软件包:
```bash
-python -m pip install pyfory==1.7.3
+python -m pip install pyfory==1.7.4
```
运行 xlang 往返示例:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/rust.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/rust.md
index 2c04545c263..e8c6393f830 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/rust.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/rust.md
@@ -34,7 +34,7 @@ cargo --version
```toml title="Cargo.toml"
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
```rust
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/scala.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/scala.md
index c5c566e76fd..3e0bebf256b 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/scala.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/scala.md
@@ -35,7 +35,7 @@ sbt --version
```sbt
ThisBuild / scalaVersion := "3.3.1"
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
创建 `src/main/scala/ScalaExample.scala`:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/swift.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/swift.md
index 22eabbf59cd..e4726d1932c 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/swift.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/start/swift.md
@@ -39,7 +39,7 @@ swift package init --type executable --name ForyExample
```swift title="Package.swift"
dependencies: [
- .package(url: "https://github.com/apache/fory.git", exact: "1.7.3")
+ .package(url: "https://github.com/apache/fory.git", exact: "1.7.4")
],
targets: [
.executableTarget(
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/build-integration.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/build-integration.md
index 49453322e7d..679635fdf68 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/build-integration.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/build-integration.md
@@ -211,7 +211,7 @@ cc_library(
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/cli.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/cli.md
index e08529951f4..46d1757ec97 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/cli.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/compiler/cli.md
@@ -659,5 +659,5 @@ fory = "x.y.z"
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/csharp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/csharp.md
index 4e2ed5b4807..fe98f7d0dea 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/csharp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/csharp.md
@@ -36,7 +36,7 @@ gRPC 客户端、服务基类、方法描述符、元数据、截止时间、取
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.71.0" />
</ItemGroup>
```
@@ -45,7 +45,7 @@ gRPC 客户端、服务基类、方法描述符、元数据、截止时间、取
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.Core.Api" Version="2.71.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
</ItemGroup>
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/dart.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/dart.md
index 2f3f602d2cd..e820d9ef72f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/dart.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/dart.md
@@ -29,7 +29,7 @@ license: |
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
grpc: ^4.0.0
dev_dependencies:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/rust.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/rust.md
index 77c403b912e..fef383ec3bb 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/rust.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/grpc/rust.md
@@ -29,7 +29,7 @@ license: |
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
bytes = "1"
tonic = { version = "0.14", features = ["transport"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/getting-started.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/getting-started.md
index 029ed5db42e..9134bea7d70 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/getting-started.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/getting-started.md
@@ -41,7 +41,7 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-json</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -55,7 +55,7 @@ repositories {
mavenCentral()
}
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
### Kotlin
@@ -64,7 +64,7 @@ Kotlin/JVM 应用添加可选的 Kotlin JSON 运行时,并使用其统一 buil
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/index.md
index 03d2c98e7f5..a0ef84b8d85 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/index.md
@@ -27,19 +27,20 @@ Fory JSON 与 Fory 的 native 和 xlang 二进制协议是不同的数据格式
## 文档导航
-| 目标 | 页面 |
-| --------------------------------------------------------------- | ---------------------------------- |
-| 运行第一个 JSON 往返示例 | [快速开始](getting-started.md) |
-| 了解 Java 对象映射和配置 | [对象映射](object-mapping.md) |
-| 配置属性、creator、值、validator 和 Mixin | [注解](annotations.md) |
-| 扩展完整值、子值和 Map 键 | [自定义 Codec](custom-codecs.md) |
-| 打包并分发可复用的 JSON 扩展 | [模块](modules.md) |
-| 使用 data class、Kotlin 可空性、默认值和值类型 | [Kotlin](kotlin.md) |
-| 使用 case class、Scala 集合和 Scala 枚举 | [Scala](scala.md) |
-| 部署到 Android | [Android](android.md) |
-| 构建 GraalVM Native Image | [GraalVM Native Image](graalvm.md) |
-| 安全解码输入 | [安全](security.md) |
-| 诊断故障 | [故障排查](troubleshooting.md) |
+| 目标 | 页面 |
+| ---------------------------------------------- | ---------------------------------- |
+| 运行第一个 JSON 往返示例 | [快速开始](getting-started.md) |
+| 集成 Spring 和 Kotlin 框架回调 | [框架集成](integration.md) |
+| 了解 Java 对象映射和配置 | [对象映射](object-mapping.md) |
+| 配置属性、creator、值、validator 和 Mixin | [注解](annotations.md) |
+| 扩展完整值、子值和 Map 键 | [自定义 Codec](custom-codecs.md) |
+| 打包并分发可复用的 JSON 扩展 | [模块](modules.md) |
+| 使用 data class、Kotlin 可空性、默认值和值类型 | [Kotlin](kotlin.md) |
+| 使用 case class、Scala 集合和 Scala 枚举 | [Scala](scala.md) |
+| 部署到 Android | [Android](android.md) |
+| 构建 GraalVM Native Image | [GraalVM Native Image](graalvm.md) |
+| 安全解码输入 | [安全](security.md) |
+| 诊断故障 | [故障排查](troubleshooting.md) |
## 性能
@@ -51,12 +52,12 @@ Java JSON 基准测试使用相同数据对比 fory-json、Jackson 和 Gson。

-| 表示形式 | 操作 | fory-json ops/sec | jackson ops/sec | gson ops/sec |
-| ---------- | ---------- | ----------------: | --------------: | -----------: |
-| String | 序列化 | 7,387,465 | 2,049,368 | 1,084,042 |
-| String | 反序列化 | 2,897,955 | 1,074,885 | 902,772 |
-| UTF-8 字节 | 序列化 | 10,375,498 | 1,868,614 | 1,037,211 |
-| UTF-8 字节 | 反序列化 | 3,077,158 | 1,268,397 | 933,079 |
+| 表示形式 | 操作 | fory-json ops/sec | jackson ops/sec | gson ops/sec |
+| ---------- | -------- | ----------------: | --------------: | -----------: |
+| String | 序列化 | 7,387,465 | 2,049,368 | 1,084,042 |
+| String | 反序列化 | 2,897,955 | 1,074,885 | 902,772 |
+| UTF-8 字节 | 序列化 | 10,375,498 | 1,868,614 | 1,037,211 |
+| UTF-8 字节 | 反序列化 | 3,077,158 | 1,268,397 | 933,079 |
## 相关 Java 指南
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/integration.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/integration.md
new file mode 100644
index 00000000000..f5852fe865f
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/integration.md
@@ -0,0 +1,85 @@
+---
+title: 框架集成
+sidebar_position: 13
+id: integration
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+## Spring Fory
+
+[spring-fory](https://github.com/chaokunyang/spring-fory) 为 Fory JSON 提供 Spring MVC 消息转换器、
+Spring WebFlux 编解码器以及 Spring Boot 自动配置 starter。它支持常规 JSON 请求和响应体,
+并在 WebFlux 中支持流式 JSON 和 NDJSON。
+
+请参阅项目的[安装和使用指南](https://github.com/chaokunyang/spring-fory#installation),
+选择与 Spring 版本匹配的适配器或 starter,并配置应用。
+
+## Kotlin 集成 {#kotlin-integration}
+
+当框架在运行时提供 Kotlin `KType`,且回调无法使用 reified 类型参数时,请使用
+`jsonTypeRef<Any?>(kType)`。传入的 `KType` 决定完整 JSON 类型,包括嵌套泛型参数和可空性。
+`Any?` 只是回调中值的静态视图,不会将传入类型替换为动态 JSON Schema。
+
+从 Kotlin 函数或 Java `Method` 获取 `KType`,需要应用添加 `kotlin-reflect` 依赖。
+其版本应与应用的 Kotlin 版本保持一致:
+
+```kotlin
+dependencies {
+ implementation(kotlin("reflect"))
+}
+```
+
+例如,发现并保留控制器方法的响应类型:
+
+```kotlin
+import java.io.OutputStream
+import kotlin.reflect.jvm.kotlinFunction
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class Employee(val id: Long, val name: String)
+data class Response<T>(val flag: Boolean, val data: T? = null, val msg: String? = null)
+
+class EmployeeController {
+ fun employees(): Response<List<Employee>> =
+ Response(true, listOf(Employee(1, "Alice")))
+}
+
+val json = ForyJsonKotlin.builder().build()
+val method = EmployeeController::class.java.getMethod("employees")
+val responseType = jsonTypeRef<Any?>(requireNotNull(method.kotlinFunction).returnType)
+
+fun writeResponse(value: Any?, output: OutputStream) {
+ json.writeJsonTo(value, responseType, output)
+}
+
+fun readResponse(bytes: ByteArray): Any? = json.fromJson(bytes, responseType)
+```
+
+每个声明类型只需发现一次,并复用对应类型令牌。对于请求体,应获取对应 Kotlin 值参数的
+`KType`。如果方法仍有未解析的类型参数,转换前必须提供具体类型实参;星投影和逆变投影仍不受支持。
+若选择了比 `Any?` 更具体的静态类型,调用方必须保证它与传入的 `KType` 一致。
+
+在 Spring MVC 中,将请求或响应适配到转换器时,应保留控制器的 Kotlin 声明。
+`SmartHttpMessageConverter` 可以通过应用提供的读写 hints 接收该 `KType` 或 Fory 类型令牌。
+如果存在 `ResponseEntity<Response<List<Employee>>>` 等 HTTP 包装类型,
+应先选取消息体类型 `Response<List<Employee>>`,再构造令牌。
+
+只提供运行时对象的 `AbstractHttpMessageConverter` 回调会丢失泛型参数。
+`AbstractGenericHttpMessageConverter` 能保留 Java 泛型,但 `TypeRef.of(javaType)` 无法恢复 Kotlin
+可空性。单独使用 Java `Type` 或运行时值,都无法恢复完整 Kotlin 声明。
+应在获取该声明后使用 `jsonTypeRef(kType)`;此 API 不会自动安装 Spring 转换器。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/kotlin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/kotlin.md
index 8f7ccd79788..282b0313c48 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/kotlin.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/kotlin.md
@@ -38,7 +38,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
@@ -50,7 +50,7 @@ plugins {
}
dependencies {
- ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.3")
+ ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.4")
}
```
@@ -95,6 +95,10 @@ val json = ForyJson.builder().withModule(ForyJsonKotlin).build()
不会按类路径自动安装模块,也没有 Kotlin 专用的编码/解码别名。
+当框架回调在运行时提供 Kotlin `KType` 时,请使用 `jsonTypeRef<Any?>(kType)`。
+控制器类型发现、请求和响应转换以及 Spring MVC 适配要求见
+[Kotlin 集成](integration.md#kotlin-integration)。
+
## 不可变类与编译器默认值 {#immutable-classes-and-compiler-defaults}
普通类或 data class 映射为具有命名属性的 JSON 对象。Fory 选择一个有效的公共 Kotlin 构造函数以及可重建的属性;`copy` 和 `componentN` 函数不参与定义 Schema。只有 JSON 成员缺失时,才使用编译器生成的默认值:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/scala.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/scala.md
index ec1c0438516..277f3996fcc 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/scala.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/scala.md
@@ -24,7 +24,7 @@ Fory JSON 通过可选的 `fory-json-scala` 制品支持 Scala 2.13 和 Scala 3
## 设置 {#setup}
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.4"
```
`ForyJsonScala.builder()` 安装 Scala 模块并返回标准 Fory JSON builder:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/troubleshooting.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/troubleshooting.md
index 6965756676c..fc748068ae3 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/troubleshooting.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/json/troubleshooting.md
@@ -19,27 +19,28 @@ license: |
limitations under the License.
---
-| 现象 | 可能原因与处理方式 |
-| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
-| 解析时出现 `ForyJsonException` | JSON 语法无效、类型不匹配、映射不受支持、违反深度或对象图内存限制、validator 失败,或存在尾随内容 |
-| `InsecureException` | Fory 禁止列表或配置的 `JsonTypeChecker` 拒绝了某个类 |
-| builder 抛出 `IllegalArgumentException` | 检查配置的深度、对象图内存、并发、保留缓冲区和缓存字段名限制 |
-| 声明类型写入被拒绝 | 值不可赋给声明类型、类型包含通配符或类型变量,或者向基本类型提供了 null |
-| 不可变值未填充 | 使用 record、有效的 `JsonCreator` 或精确的自定义 codec |
-| `JsonValue` 读取失败 | 添加一个接收普通 `String` 的 `JsonCreator`,或注册精确的自定义 codec |
-| 原始 JSON 输出无效 | 为 `JsonRawValue` 属性提供且只提供一个可信的完整 JSON 值 |
-| 无法构造普通对象 | 添加可用的无参 constructor、使用 record 或 `JsonCreator`,或注册自定义 codec;Android 和 GraalVM Native Image 的要求更严格 |
-| 普通 accessor 注解失败 | 方法不是有效的 public JavaBean accessor,或已启用 field mode |
-| Any 注解失败 | 只使用一种基于字段的形式,或一对类型解析为 `Map<String, V>` 的有效方法形式;方法注解要求关闭 field mode |
-| Codec 注解失败 | 解决同一节点或继承层次冲突、移除被隐藏的嵌套覆盖,或使用具有 public 无参 constructor 的 codec 类 |
-| 子类型被拒绝 | 写入时未声明基类、运行时类不是类型表中的精确条目,或输入 JSON 结构与配置的包含方式不一致 |
-| 无法读取 Collection | 目标应为受支持的接口或常见实现,也可以注册自定义 codec |
-| OutputStream 写入失败 | 底层 `IOException` 被包装为 `ForyJsonException` 的 cause |
-| Kotlin null 或成员缺失导致失败 | 检查精确的 `jsonTypeRef`、构造函数默认值和可空使用位置;null 不会请求编译器默认值 |
-| Kotlin 原始泛型、星投影或类型投影失败 | 提供完整的 `jsonTypeRef<T>()`;`in` 和星投影无法重建一个精确 Schema |
-| 不支持的 Kotlin 元数据 | 确保解析到的 `kotlin-metadata-jvm` 支持模型编译器的元数据,并且经过验证的 JVM 成员与元数据匹配 |
-| Kotlin 模型在 Android 代码压缩后失败 | 启用 KSP;精确 Mixin 的来源或目标任一为 Kotlin 时均需使用,并验证生成的规则已打包 |
-| Native Image 中缺少 Kotlin 模型 | 从可达的 `ForyJsonProvider` 安装 `ForyJsonKotlin`,启用代码生成,并使精确绑定从该配置可达 |
+| 现象 | 可能原因与处理方式 |
+| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| 解析时出现 `ForyJsonException` | JSON 语法无效、类型不匹配、映射不受支持、违反深度或对象图内存限制、validator 失败,或存在尾随内容 |
+| `InsecureException` | Fory 禁止列表或配置的 `JsonTypeChecker` 拒绝了某个类 |
+| builder 抛出 `IllegalArgumentException` | 检查配置的深度、对象图内存、并发、保留缓冲区和缓存字段名限制 |
+| 声明类型写入被拒绝 | 值不可赋给声明类型、类型包含通配符或类型变量,或者向基本类型提供了 null |
+| 不可变值未填充 | 使用 record、有效的 `JsonCreator` 或精确的自定义 codec |
+| `JsonValue` 读取失败 | 添加一个接收普通 `String` 的 `JsonCreator`,或注册精确的自定义 codec |
+| 原始 JSON 输出无效 | 为 `JsonRawValue` 属性提供且只提供一个可信的完整 JSON 值 |
+| 无法构造普通对象 | 添加可用的无参 constructor、使用 record 或 `JsonCreator`,或注册自定义 codec;Android 和 GraalVM Native Image 的要求更严格 |
+| 普通 accessor 注解失败 | 方法不是有效的 public JavaBean accessor,或已启用 field mode |
+| Any 注解失败 | 只使用一种基于字段的形式,或一对类型解析为 `Map<String, V>` 的有效方法形式;方法注解要求关闭 field mode |
+| Codec 注解失败 | 解决同一节点或继承层次冲突、移除被隐藏的嵌套覆盖,或使用具有 public 无参 constructor 的 codec 类 |
+| 子类型被拒绝 | 写入时未声明基类、运行时类不是类型表中的精确条目,或输入 JSON 结构与配置的包含方式不一致 |
+| 无法读取 Collection | 目标应为受支持的接口或常见实现,也可以注册自定义 codec |
+| OutputStream 写入失败 | 底层 `IOException` 被包装为 `ForyJsonException` 的 cause |
+| Kotlin null 或成员缺失导致失败 | 检查精确的 `jsonTypeRef`、构造函数默认值和可空使用位置;null 不会请求编译器默认值 |
+| Kotlin 原始泛型、星投影或类型投影失败 | 提供完整的 `jsonTypeRef<T>()`;`in` 和星投影无法重建一个精确 Schema |
+| 框架转换器中的 Kotlin 泛型转换失败 | 保留声明的 Kotlin `KType` 并使用 `jsonTypeRef<Any?>(kType)`;Java 的 `TypeRef.of(type)` 无法恢复 Kotlin 可空性。参见[框架集成](integration.md#kotlin-integration) |
+| 不支持的 Kotlin 元数据 | 确保解析到的 `kotlin-metadata-jvm` 支持模型编译器的元数据,并且经过验证的 JVM 成员与元数据匹配 |
+| Kotlin 模型在 Android 代码压缩后失败 | 启用 KSP;精确 Mixin 的来源或目标任一为 Kotlin 时均需使用,并验证生成的规则已打包 |
+| Native Image 中缺少 Kotlin 模型 | 从可达的 `ForyJsonProvider` 安装 `ForyJsonKotlin`,启用代码生成,并使精确绑定从该配置可达 |
Fory JSON 的映射、语法、codec、深度、对象图内存、validator 和输出失败使用
`ForyJsonException`。用户 codec 代码仍可能抛出自己的运行时异常。除 `Error` 以外的 creator
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/cpp/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/cpp/index.md
index e184535818c..eeb42eb4a24 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/cpp/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/cpp/index.md
@@ -60,7 +60,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
@@ -90,11 +90,11 @@ module(
bazel_dep(name = "rules_cc", version = "0.1.1")
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
git_override(
module_name = "fory",
remote = "https://github.com/apache/fory.git",
- commit = "v1.7.3", # Or use a specific commit hash for reproducibility
+ commit = "v1.7.4", # Or use a specific commit hash for reproducibility
)
```
@@ -125,7 +125,7 @@ bazel run //:my_app
本地开发时,可以改用 `local_path_override`:
```bazel
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
local_path_override(
module_name = "fory",
path = "/path/to/fory",
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/csharp/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/csharp/index.md
index d2f7ccf3a74..d9d1c848718 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/csharp/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/csharp/index.md
@@ -44,7 +44,7 @@ Apache Fory™ C# 是面向 .NET 的高性能跨语言序列化库。它支持
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
</ItemGroup>
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/dart/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/dart/index.md
index 2f607856ca5..dc76350350f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/dart/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/dart/index.md
@@ -44,7 +44,7 @@ Apache Fory™ Dart 可以将 Dart 对象序列化为字节并反序列化,也
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/basic-serialization.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/basic-serialization.md
index 7c3818651aa..5b11e9575ca 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/basic-serialization.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/basic-serialization.md
@@ -265,6 +265,18 @@ byte[] bytes = fory.serialize(node1);
- 除非每种目标语言都有约定的映射,否则避免使用 `Optional`、`BigDecimal` 和 `EnumSet` 等 Java 专用类型。
- 完整兼容性矩阵参见[类型映射指南](../../specification/xlang_type_mapping.md)。
+#### 时间戳 {#timestamps}
+
+在 xlang 模式(`withXlang(true)`)下,`java.util.Date` 和 `java.sql.Date` 与 `java.time.Instant`
+一样使用 `timestamp` 类型:先写入 8 字节的秒数,再写入 4 字节的纳秒数。声明为 `Date` 的字段保留
+对应的 Java 类型。未声明字段类型的时间戳,例如动态根值,读取后返回 `Instant`。
+
+`Date` 值保留毫秒精度。将时间戳读为 `Date` 时,会向下取整到前一个毫秒,舍弃亚毫秒精度。
+超出有符号 64 位毫秒范围的时间戳无法表示为 `Date`。
+
+在 Java 原生模式(`withXlang(false)`)下,`java.util.Date` 和 `java.sql.Date` 将 Unix 纪元以来的
+毫秒数编码为 8 字节有符号整数。反序列化会保留原始 Java 类型,根值也不例外。
+
#### 列表与稠密数组
Java 原始类型数组是稠密 `array<T>` 载体,但普通 `byte[]` 默认映射为 `bytes`。常规 Java 集合以及 `Int32List`、`Float16List`、`BFloat16List` 等 Fory 原始类型列表载体使用 `list<T>`,除非字段具有显式 `@ArrayType` 元数据。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/index.md
index 111bf3829de..4306986b363 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/index.md
@@ -51,7 +51,7 @@ Fory core 支持 Java 8 及更高版本。Java Record 序列化需要 Java 17
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -59,7 +59,7 @@ Fory core 支持 Java 8 及更高版本。Java Record 序列化需要 Java 17
```kotlin
// Binary object serialization
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
#### JDK 25 及更高版本
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/schema-metadata.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/schema-metadata.md
index 6d39d129319..366aed34d3a 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/schema-metadata.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/java/schema-metadata.md
@@ -87,10 +87,10 @@ public class User {
### 参数
-| 参数 | 类型 | 默认值 | 说明 |
-| --------- | --------- | ------- | -------------------------------- |
-| `id` | `int` | `-1` | 字段 tag ID,或内部无 ID 哨兵值 |
-| `dynamic` | `Dynamic` | `AUTO` | 控制结构体字段的多态行为 |
+| 参数 | 类型 | 默认值 | 说明 |
+| --------- | --------- | ------ | ------------------------------- |
+| `id` | `int` | `-1` | 字段 tag ID,或内部无 ID 哨兵值 |
+| `dynamic` | `Dynamic` | `AUTO` | 控制结构体字段的多态行为 |
在字段类型或嵌套类型位置使用 `@Nullable` 表示可空 Schema 元数据,使用 `@Ref` 表示引用跟踪。`@ForyField` 本身不包含这两项设置。
@@ -163,6 +163,9 @@ public class Record {
- 字段不可空时,Fory 会跳过 null 标志的写入。
- 可为 null 的装箱类型(`Integer`、`Long` 等)应使用 `@Nullable`。
+如果没有 null 或引用标志的字段包含 null,序列化会失败。错误会指出具体字段,并建议使用 `@Nullable`。
+对于仅在 Java 中使用的序列化,可通过 `Fory.builder().withXlang(false)` 让未标注的引用字段默认可空。
+
## 引用跟踪(`@Ref`)
可能共享或形成循环的字段应启用引用跟踪:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/kotlin/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/kotlin/index.md
index 57c2f0e0c15..859cca86658 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/kotlin/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/kotlin/index.md
@@ -53,14 +53,14 @@ Fory Kotlin 继承了 Fory Java 的全部功能,并增加了 Kotlin 特有优
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
### Gradle
```kotlin
-implementation("org.apache.fory:fory-kotlin:1.7.3")
+implementation("org.apache.fory:fory-kotlin:1.7.4")
```
### JDK25+
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/basic-serialization.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/basic-serialization.md
index 3736d8c3e4a..44f3a9f44e7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/basic-serialization.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/basic-serialization.md
@@ -145,7 +145,7 @@ Rust 启用 `chrono::NaiveDate`、`chrono::NaiveDateTime` 和 `chrono::Duration`
```toml
[dependencies]
-fory = { version = "1.7.3", features = ["chrono"] }
+fory = { version = "1.7.4", features = ["chrono"] }
```
### 自定义类型
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/index.md
index 2696cc72bba..0b87858fd4e 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/rust/index.md
@@ -36,9 +36,9 @@ Rust 实现通过自动内存管理和编译期类型安全提供灵活的高性
| Crate | 说明 | 版本 |
| --------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------- |
-| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | 面向用户的 API、运行时类型和派生宏 | [1.7.3](https://crates.io/crates/fory) |
-| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | 用于高级集成的底层运行时 crate | [1.7.3](https://crates.io/crates/fory-core) |
-| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | 供直接使用运行时的底层过程宏 crate | [1.7.3](https://crates.io/crates/fory-derive) |
+| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | 面向用户的 API、运行时类型和派生宏 | [1.7.4](https://crates.io/crates/fory) |
+| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | 用于高级集成的底层运行时 crate | [1.7.4](https://crates.io/crates/fory-core) |
+| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | 供直接使用运行时的底层过程宏 crate | [1.7.4](https://crates.io/crates/fory-derive) |
大多数应用程序只需依赖 `fory`。它重新导出生成代码所需的派生宏和公共运行时类型。只有明确要基于底层运行时 crate 构建时,才直接使用 `fory-core` 或 `fory-derive`。
@@ -48,7 +48,7 @@ Rust 实现通过自动内存管理和编译期类型安全提供灵活的高性
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
### 基本示例
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/scala/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/scala/index.md
index 035a4c3fc8e..346142449b6 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/scala/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/object-serialization/scala/index.md
@@ -49,7 +49,7 @@ Fory Scala 继承了 Fory Java 的全部功能,并增加了 Scala 特有优化
使用 sbt 添加依赖:
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
### JDK25+
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/row-format/java.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/row-format/java.md
index 0df3fa8d21a..0465d4d19a8 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/row-format/java.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/row-format/java.md
@@ -41,14 +41,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-format</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-format:1.7.3")
+implementation("org.apache.fory:fory-format:1.7.4")
```
## 基本用法
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/specification/xlang_type_mapping.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/specification/xlang_type_mapping.md
index fff7dca8981..799441b85d7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/specification/xlang_type_mapping.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/specification/xlang_type_mapping.md
@@ -117,6 +117,9 @@ license: |
- Python 的 `pyfory.Float16` 和 `pyfory.BFloat16` 是预留的注解标记;标量值反序列化为 Python 原生 `float`。
- Python 的 `BoolArray`、`Int8Array`、`Int16Array`、`Int32Array`、`Int64Array`、`UInt8Array`、`UInt16Array`、`UInt32Array`、`UInt64Array`、`Float16Array`、`BFloat16Array`、`Float32Array` 和 `Float64Array` 是公开的稠密数组包装器,具有类似列表的序列行为。
- JavaScript 的 `BoolArray`、回退实现 `Float16Array` 和 `BFloat16Array` 是基于 `Uint8Array` 或 `Uint16Array` 的公开稠密数组包装器。`float16` 和 `bfloat16` 标量值使用 `number`。原生支持 `Float16Array` 的 JavaScript 环境可以为 `array<float16>` 返回该原生载体。
+- Java 的 `java.util.Date` 和 `java.sql.Date` 也映射到 `timestamp`,使用秒数和纳秒数。
+ 声明类型的字段保留其 Java 载体类型;动态时间戳使用 `Instant`。
+ Date 载体保留毫秒精度,读取时间戳时向下取整到毫秒。
- Java 中不带注解的 `byte[]` 映射到 `binary`。数值字节数组使用类型使用位置注解:
`@Int8Type byte[]` 用于 `array<int8>`,`@UInt8Type byte[]` 用于 `array<uint8>`。
- Dart 使用 `double` 加 `Float16Type` 或 `Bfloat16Type` 元数据表示 `float16` 和 `bfloat16`
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/cpp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/cpp.md
index eaf1881fc57..2c92b3c4bee 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/cpp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/cpp.md
@@ -42,7 +42,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/csharp.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/csharp.md
index 65d47a3f894..ace1178f76f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/csharp.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/csharp.md
@@ -34,7 +34,7 @@ dotnet --version
```bash
dotnet new console -n ForyExample
cd ForyExample
-dotnet add package Apache.Fory --version 1.7.3
+dotnet add package Apache.Fory --version 1.7.4
```
将 `Program.cs` 替换为:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/dart.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/dart.md
index 0c4af43826c..92cbac79ade 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/dart.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/dart.md
@@ -34,7 +34,7 @@ dart pub --help
```yaml
dependencies:
- fory: 1.7.3
+ fory: 1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/go.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/go.md
index 957a6694c55..cd890b8e6c7 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/go.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/go.md
@@ -36,7 +36,7 @@ go env GOPROXY
mkdir fory-example
cd fory-example
go mod init example.com/fory-example
-go get github.com/apache/fory/go/fory@v1.7.3
+go get github.com/apache/fory/go/fory@v1.7.4
```
如果 Go proxy 尚未收录新的 submodule tag,请稍后重试,或者暂时使用 `GOPROXY=direct`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/java.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/java.md
index d515e7e42b9..ecbdc93b759 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/java.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/java.md
@@ -39,14 +39,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
运行下面完整的 xlang 往返示例:
@@ -85,7 +85,7 @@ public final class ForyExample {
Fory JSON 将 Java 对象映射为标准 JSON 文本和 UTF-8 字节。如果应用只需要 JSON,请添加 `fory-json`,无需添加 `fory-core`:
```kotlin
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
在 `ForyExample.java` 中添加 import:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/javascript.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/javascript.md
index 22f3a489609..17faace8091 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/javascript.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/javascript.md
@@ -33,7 +33,7 @@ npm --version
安装 core 软件包:
```bash
-npm install @apache-fory/core@1.7.3
+npm install @apache-fory/core@1.7.4
```
定义 Schema 并运行 xlang 往返示例:
@@ -65,7 +65,7 @@ JavaScript 使用 xlang 模式。接下来可阅读 [JavaScript/TypeScript 对
若要使用可选的 Node.js 字符串快速路径,请安装版本匹配的软件包:
```bash
-npm install @apache-fory/core@1.7.3 @apache-fory/hps@1.7.3
+npm install @apache-fory/core@1.7.4 @apache-fory/hps@1.7.4
```
## 其他能力
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/kotlin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/kotlin.md
index 94cb9ff4972..386bf872eca 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/kotlin.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/kotlin.md
@@ -42,7 +42,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-kotlin:1.7.4")
}
```
@@ -81,7 +81,7 @@ Fory JSON 是独立于二进制对象序列化的文本格式。与普通 JSON A
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/python.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/python.md
index a8d02cefce3..732da72f1e4 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/python.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/python.md
@@ -33,7 +33,7 @@ python -m pip --version
安装已发布的软件包:
```bash
-python -m pip install pyfory==1.7.3
+python -m pip install pyfory==1.7.4
```
运行 xlang 往返示例:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/rust.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/rust.md
index 2c04545c263..e8c6393f830 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/rust.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/rust.md
@@ -34,7 +34,7 @@ cargo --version
```toml title="Cargo.toml"
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
```rust
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/scala.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/scala.md
index c5c566e76fd..3e0bebf256b 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/scala.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/scala.md
@@ -35,7 +35,7 @@ sbt --version
```sbt
ThisBuild / scalaVersion := "3.3.1"
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
创建 `src/main/scala/ScalaExample.scala`:
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/swift.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/swift.md
index 22eabbf59cd..e4726d1932c 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/swift.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/start/swift.md
@@ -39,7 +39,7 @@ swift package init --type executable --name ForyExample
```swift title="Package.swift"
dependencies: [
- .package(url: "https://github.com/apache/fory.git", exact: "1.7.3")
+ .package(url: "https://github.com/apache/fory.git", exact: "1.7.4")
],
targets: [
.executableTarget(
diff --git a/i18n/zh-CN/docusaurus-plugin-content-pages/download/index.md b/i18n/zh-CN/docusaurus-plugin-content-pages/download/index.md
index 08bfead90fd..c97e8f045b2 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-pages/download/index.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-pages/download/index.md
@@ -9,11 +9,11 @@ Apache Fory™ 的官方发布以源码制品形式提供。
## 最新版本
-当前最新源码版本为 1.7.3:
+当前最新源码版本为 1.7.4:
| 版本 | 日期 | 源码 | 发布说明 |
| ----- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
-| 1.7.3 | 2026-09-16 | [source](https://www.apache.org/dyn/closer.lua/fory/1.7.3/apache-fory-1.7.3-src.tar.gz?action=download) [asc](https://downloads.apache.org/fory/1.7.3/apache-fory-1.7.3-src.tar.gz.asc) [sha512](https://downloads.apache.org/fory/1.7.3/apache-fory-1.7.3-src.tar.gz.sha512) | [release notes](https://github.com/apache/fory/releases/tag/v1.7.3) |
+| 1.7.4 | 2026-09-20 | [source](https://www.apache.org/dyn/closer.lua/fory/1.7.4/apache-fory-1.7.4-src.tar.gz?action=download) [asc](https://downloads.apache.org/fory/1.7.4/apache-fory-1.7.4-src.tar.gz.asc) [sha512](https://downloads.apache.org/fory/1.7.4/apache-fory-1.7.4-src.tar.gz.sha512) | [release notes](https://github.com/apache/fory/releases/tag/v1.7.4) |
## 所有归档版本
@@ -31,13 +31,13 @@ Fory 为下载站点上的所有文件提供 SHA 摘要和 PGP 签名文件。
要验证 SHA 摘要,你需要 `.tar.gz` 文件及其对应的 `.tar.gz.sha512` 文件。示例命令如下:
```bash
-sha512sum --check apache-fory-1.7.3-src.tar.gz.sha512
+sha512sum --check apache-fory-1.7.4-src.tar.gz.sha512
```
输出类似下面这样即表示校验通过:
```bash
-apache-fory-1.7.3-src.tar.gz: OK
+apache-fory-1.7.4-src.tar.gz: OK
```
### 校验签名
@@ -53,13 +53,13 @@ gpg --import KEYS
之后可以校验签名:
```bash
-gpg --verify apache-fory-1.7.3-src.tar.gz.asc apache-fory-1.7.3-src.tar.gz
+gpg --verify apache-fory-1.7.4-src.tar.gz.asc apache-fory-1.7.4-src.tar.gz
```
如果出现如下输出,即表示签名正确:
```bash
-gpg: Signature made Sun Sep 13 00:59:21 2026 CST
+gpg: Signature made Thu Sep 17 18:48:04 2026 CST
gpg: using RSA key 1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4
gpg: Good signature from "chaokunyang (CODE SIGNING KEY) <ch...@apache.org>" [unknown]
```
diff --git a/src/components/home/HomepageLanding.tsx b/src/components/home/HomepageLanding.tsx
index 4f923f50f63..5c82c3bb501 100644
--- a/src/components/home/HomepageLanding.tsx
+++ b/src/components/home/HomepageLanding.tsx
@@ -138,7 +138,7 @@ const runtimeExamples: RuntimeExample[] = [
install: `<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>`,
codeLanguage: "java",
guide: "/docs/object-serialization/java/",
@@ -160,7 +160,7 @@ Person out = (Person) fory.deserialize(bytes);`,
id: "python",
label: "Python",
installLanguage: "bash",
- install: `pip install pyfory==1.7.3`,
+ install: `pip install pyfory==1.7.4`,
codeLanguage: "python",
guide: "/docs/object-serialization/python/",
summary:
@@ -183,7 +183,7 @@ out = fory.deserialize(data)`,
id: "rust",
label: "Rust",
installLanguage: "bash",
- install: `cargo add fory@1.7.3`,
+ install: `cargo add fory@1.7.4`,
codeLanguage: "rust",
guide: "/docs/object-serialization/rust/",
summary:
@@ -209,7 +209,7 @@ fn main() -> Result<(), Error> {
id: "go",
label: "Go",
installLanguage: "bash",
- install: `go get github.com/apache/fory/go/fory@v1.7.3`,
+ install: `go get github.com/apache/fory/go/fory@v1.7.4`,
codeLanguage: "go",
guide: "/docs/object-serialization/go/",
summary:
@@ -234,7 +234,7 @@ _ = f.Deserialize(payload, &out)`,
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)`,
@@ -262,7 +262,7 @@ auto out = fory.deserialize<Person>(bytes).value();`,
id: "javascript",
label: "JavaScript",
installLanguage: "bash",
- install: `npm install @apache-fory/core@1.7.3 @apache-fory/hps@1.7.3`,
+ install: `npm install @apache-fory/core@1.7.4 @apache-fory/hps@1.7.4`,
codeLanguage: "typescript",
guide: "/docs/object-serialization/javascript/",
summary:
@@ -284,7 +284,7 @@ const out = deserialize(payload);`,
id: "csharp",
label: "C#",
installLanguage: "bash",
- install: `dotnet add package Apache.Fory --version 1.7.3`,
+ install: `dotnet add package Apache.Fory --version 1.7.4`,
codeLanguage: "csharp",
guide: "/docs/object-serialization/csharp/",
summary:
@@ -308,7 +308,7 @@ Person out = fory.Deserialize<Person>(payload);`,
id: "swift",
label: "Swift",
installLanguage: "swift",
- install: `.package(url: "https://github.com/apache/fory.git", exact: "1.7.3")`,
+ install: `.package(url: "https://github.com/apache/fory.git", exact: "1.7.4")`,
codeLanguage: "swift",
guide: "/docs/object-serialization/swift/",
summary:
@@ -332,7 +332,7 @@ let out: Person = try fory.deserialize(payload)`,
label: "Dart",
installLanguage: "yaml",
install: `dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.13`,
@@ -368,7 +368,7 @@ final out = fory.deserialize<Person>(payload);`,
id: "scala",
label: "Scala",
installLanguage: "sbt",
- install: `libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"`,
+ install: `libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"`,
codeLanguage: "scala",
guide: "/docs/object-serialization/scala/",
summary:
@@ -389,8 +389,8 @@ val out = fory.deserialize(payload).asInstanceOf[Person]`,
id: "kotlin",
label: "Kotlin",
installLanguage: "kotlin",
- install: `implementation("org.apache.fory:fory-kotlin:1.7.3")
-ksp("org.apache.fory:fory-kotlin-ksp:1.7.3")`,
+ install: `implementation("org.apache.fory:fory-kotlin:1.7.4")
+ksp("org.apache.fory:fory-kotlin-ksp:1.7.4")`,
codeLanguage: "kotlin",
guide: "/docs/object-serialization/kotlin/",
summary:
diff --git a/src/pages/download/index.md b/src/pages/download/index.md
index c1078d22b1c..8216092a779 100644
--- a/src/pages/download/index.md
+++ b/src/pages/download/index.md
@@ -9,11 +9,11 @@ For binary install, please see the Apache Fory™ [getting started](/docs/start/
## The latest release
-The latest source release is 1.7.3:
+The latest source release is 1.7.4:
| Version | Date | Source | Release Notes |
| ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
-| 1.7.3 | 2026-09-16 | [source](https://www.apache.org/dyn/closer.lua/fory/1.7.3/apache-fory-1.7.3-src.tar.gz?action=download) [asc](https://downloads.apache.org/fory/1.7.3/apache-fory-1.7.3-src.tar.gz.asc) [sha512](https://downloads.apache.org/fory/1.7.3/apache-fory-1.7.3-src.tar.gz.sha512) | [release notes](https://github.com/apache/fory/releases/tag/v1.7.3) |
+| 1.7.4 | 2026-09-20 | [source](https://www.apache.org/dyn/closer.lua/fory/1.7.4/apache-fory-1.7.4-src.tar.gz?action=download) [asc](https://downloads.apache.org/fory/1.7.4/apache-fory-1.7.4-src.tar.gz.asc) [sha512](https://downloads.apache.org/fory/1.7.4/apache-fory-1.7.4-src.tar.gz.sha512) | [release notes](https://github.com/apache/fory/releases/tag/v1.7.4) |
## All archived releases
@@ -31,13 +31,13 @@ These files are named after the files they relate to but have `.sha512/.asc` ext
To verify the SHA digests, you need the `.tar.gz` file and its associated `.tar.gz.sha512` file. An example command:
```bash
-sha512sum --check apache-fory-1.7.3-src.tar.gz.sha512
+sha512sum --check apache-fory-1.7.4-src.tar.gz.sha512
```
It should output something like:
```bash
-apache-fory-1.7.3-src.tar.gz: OK
+apache-fory-1.7.4-src.tar.gz: OK
```
### Verifying Signatures
@@ -54,13 +54,13 @@ gpg --import KEYS
Then you can verify signature:
```bash
-gpg --verify apache-fory-1.7.3-src.tar.gz.asc apache-fory-1.7.3-src.tar.gz
+gpg --verify apache-fory-1.7.4-src.tar.gz.asc apache-fory-1.7.4-src.tar.gz
```
If something like the following appears, it means the signature is correct:
```bash
-gpg: Signature made Sun Sep 13 00:59:21 2026 CST
+gpg: Signature made Thu Sep 17 18:48:04 2026 CST
gpg: using RSA key 1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4
gpg: Good signature from "chaokunyang (CODE SIGNING KEY) <ch...@apache.org>" [unknown]
```
diff --git a/versioned_docs/version-1.7.0/compiler/build-integration.md b/versioned_docs/version-1.7.0/compiler/build-integration.md
index 0cb05604c6f..d8becffd278 100644
--- a/versioned_docs/version-1.7.0/compiler/build-integration.md
+++ b/versioned_docs/version-1.7.0/compiler/build-integration.md
@@ -211,7 +211,7 @@ Add the Fory dependency to `pubspec.yaml`:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/versioned_docs/version-1.7.0/compiler/cli.md b/versioned_docs/version-1.7.0/compiler/cli.md
index 804c89034f4..f444d7cbd3f 100644
--- a/versioned_docs/version-1.7.0/compiler/cli.md
+++ b/versioned_docs/version-1.7.0/compiler/cli.md
@@ -689,5 +689,5 @@ fory = "x.y.z"
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
```
diff --git a/versioned_docs/version-1.7.0/grpc/csharp.md b/versioned_docs/version-1.7.0/grpc/csharp.md
index fbd4f4095f7..4b841523a60 100644
--- a/versioned_docs/version-1.7.0/grpc/csharp.md
+++ b/versioned_docs/version-1.7.0/grpc/csharp.md
@@ -39,7 +39,7 @@ Server project:
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.71.0" />
</ItemGroup>
```
@@ -48,7 +48,7 @@ Client project:
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
<PackageReference Include="Grpc.Core.Api" Version="2.71.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
</ItemGroup>
diff --git a/versioned_docs/version-1.7.0/grpc/dart.md b/versioned_docs/version-1.7.0/grpc/dart.md
index 669c9d94279..af6c82ae419 100644
--- a/versioned_docs/version-1.7.0/grpc/dart.md
+++ b/versioned_docs/version-1.7.0/grpc/dart.md
@@ -38,7 +38,7 @@ application that compiles or runs generated service companions:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
grpc: ^4.0.0
dev_dependencies:
diff --git a/versioned_docs/version-1.7.0/grpc/rust.md b/versioned_docs/version-1.7.0/grpc/rust.md
index fccfac10365..6558ca94943 100644
--- a/versioned_docs/version-1.7.0/grpc/rust.md
+++ b/versioned_docs/version-1.7.0/grpc/rust.md
@@ -37,7 +37,7 @@ to build streaming responses or request streams.
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
bytes = "1"
tonic = { version = "0.14", features = ["transport"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
diff --git a/versioned_docs/version-1.7.0/json/getting-started.md b/versioned_docs/version-1.7.0/json/getting-started.md
index 362173d52c5..18516d9d160 100644
--- a/versioned_docs/version-1.7.0/json/getting-started.md
+++ b/versioned_docs/version-1.7.0/json/getting-started.md
@@ -43,7 +43,7 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-json</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -57,7 +57,7 @@ repositories {
mavenCentral()
}
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
### Kotlin
@@ -66,7 +66,7 @@ Kotlin/JVM applications add the optional Kotlin JSON runtime and use its single
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/versioned_docs/version-1.7.0/json/index.md b/versioned_docs/version-1.7.0/json/index.md
index 97a436f060c..21b728c7734 100644
--- a/versioned_docs/version-1.7.0/json/index.md
+++ b/versioned_docs/version-1.7.0/json/index.md
@@ -34,6 +34,7 @@ reference identity, circular graphs, or Fory's binary-only features.
| Goal | Page |
| --------------------------------------------------------------- | ------------------------------------- |
| First runnable JSON round trip | [Getting Started](getting-started.md) |
+| Integrate with Spring and Kotlin framework callbacks | [Integration](integration.md) |
| Understand Java object mapping and configuration | [Object Mapping](object-mapping.md) |
| Configure properties, creators, values, validators, and mixins | [Annotations](annotations.md) |
| Extend complete values, children, and map keys | [Custom Codecs](custom-codecs.md) |
diff --git a/versioned_docs/version-1.7.0/json/integration.md b/versioned_docs/version-1.7.0/json/integration.md
new file mode 100644
index 00000000000..1af3955de6a
--- /dev/null
+++ b/versioned_docs/version-1.7.0/json/integration.md
@@ -0,0 +1,90 @@
+---
+title: Integration
+sidebar_position: 13
+id: integration
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+## Spring Fory
+
+[spring-fory](https://github.com/chaokunyang/spring-fory) provides Spring MVC message converters,
+Spring WebFlux codecs, and Spring Boot auto-configuration starters for Fory JSON. It supports
+ordinary JSON request and response bodies, with streaming JSON and NDJSON support in WebFlux.
+
+See the project's [installation and usage guide](https://github.com/chaokunyang/spring-fory#installation)
+to select the adapter or starter matching your Spring version and configure your application.
+
+## Kotlin integration
+
+Use `jsonTypeRef<Any?>(kType)` when a framework supplies a Kotlin `KType` at runtime and the
+callback cannot use a reified type argument. The supplied `KType` determines the complete JSON
+type, including nested generic arguments and nullability. `Any?` is only the callback's static
+view of the value; it does not replace the supplied type with a dynamic JSON schema.
+
+Obtaining a `KType` from a Kotlin function or a Java `Method` requires the application's
+`kotlin-reflect` dependency. Match its version to the application's Kotlin version:
+
+```kotlin
+dependencies {
+ implementation(kotlin("reflect"))
+}
+```
+
+For example, discover and retain a controller method's response type:
+
+```kotlin
+import java.io.OutputStream
+import kotlin.reflect.jvm.kotlinFunction
+import org.apache.fory.json.kotlin.ForyJsonKotlin
+import org.apache.fory.json.kotlin.jsonTypeRef
+
+data class Employee(val id: Long, val name: String)
+data class Response<T>(val flag: Boolean, val data: T? = null, val msg: String? = null)
+
+class EmployeeController {
+ fun employees(): Response<List<Employee>> =
+ Response(true, listOf(Employee(1, "Alice")))
+}
+
+val json = ForyJsonKotlin.builder().build()
+val method = EmployeeController::class.java.getMethod("employees")
+val responseType = jsonTypeRef<Any?>(requireNotNull(method.kotlinFunction).returnType)
+
+fun writeResponse(value: Any?, output: OutputStream) {
+ json.writeJsonTo(value, responseType, output)
+}
+
+fun readResponse(bytes: ByteArray): Any? = json.fromJson(bytes, responseType)
+```
+
+Discover each declared type once and reuse its token. For request bodies, obtain the corresponding
+Kotlin value parameter's `KType`. A method with unresolved type parameters still needs its concrete
+type arguments before conversion; star projections and contravariant projections remain unsupported.
+If you select a static type more specific than `Any?`, the caller must ensure it matches the
+supplied `KType`.
+
+For Spring MVC, retain the controller's Kotlin declaration when adapting the request or response
+to a converter. A `SmartHttpMessageConverter` can receive application-provided read/write hints
+containing that `KType` or its Fory type token. When an HTTP wrapper such as
+`ResponseEntity<Response<List<Employee>>>` is present, select the body type
+`Response<List<Employee>>` before constructing the token.
+
+An `AbstractHttpMessageConverter` callback that supplies only the runtime object loses generic
+arguments. `AbstractGenericHttpMessageConverter` preserves Java generics, but
+`TypeRef.of(javaType)` does not restore Kotlin nullability. Neither a Java `Type` nor the runtime
+value alone can recover the full Kotlin declaration. Use `jsonTypeRef(kType)` after obtaining that
+declaration; this API does not automatically install a Spring converter.
diff --git a/versioned_docs/version-1.7.0/json/kotlin.md b/versioned_docs/version-1.7.0/json/kotlin.md
index 5b00969d2ea..1b75007d456 100644
--- a/versioned_docs/version-1.7.0/json/kotlin.md
+++ b/versioned_docs/version-1.7.0/json/kotlin.md
@@ -41,7 +41,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
@@ -54,7 +54,7 @@ plugins {
}
dependencies {
- ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.3")
+ ksp("org.apache.fory:fory-json-kotlin-ksp:1.7.4")
}
```
@@ -108,6 +108,10 @@ val json = ForyJson.builder().withModule(ForyJsonKotlin).build()
There is no automatic classpath installation or Kotlin-specific encode/decode alias.
+For framework callbacks with a runtime Kotlin `KType`, use `jsonTypeRef<Any?>(kType)`.
+See [Kotlin integration](integration.md#kotlin-integration) for controller type discovery,
+request and response conversion, and Spring MVC adapter requirements.
+
## Immutable classes and compiler defaults
An ordinary or data class is mapped as a named JSON object. Fory selects one valid public Kotlin
diff --git a/versioned_docs/version-1.7.0/json/scala.md b/versioned_docs/version-1.7.0/json/scala.md
index f3a9b8c48b7..f24277a2034 100644
--- a/versioned_docs/version-1.7.0/json/scala.md
+++ b/versioned_docs/version-1.7.0/json/scala.md
@@ -25,7 +25,7 @@ module works on the ordinary JVM and GraalVM Native Image. Android is not suppor
## Setup
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-json-scala" % "1.7.4"
```
`ForyJsonScala.builder()` installs the Scala module and returns the standard Fory JSON builder:
diff --git a/versioned_docs/version-1.7.0/json/troubleshooting.md b/versioned_docs/version-1.7.0/json/troubleshooting.md
index 5d301fddf51..d5d08677c65 100644
--- a/versioned_docs/version-1.7.0/json/troubleshooting.md
+++ b/versioned_docs/version-1.7.0/json/troubleshooting.md
@@ -19,27 +19,28 @@ license: |
limitations under the License.
---
-| Symptom | Likely cause and action |
-| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `ForyJsonException` while parsing | Invalid JSON grammar, type mismatch, unsupported mapping, depth or graph-memory violation, validator failure, or trailing content |
-| `InsecureException` | Fory's disallow list or the configured `JsonTypeChecker` rejected a class |
-| `IllegalArgumentException` from a builder | Check the configured depth, graph-memory, concurrency, retained-buffer, and cached-field-name limits |
-| Declared write is rejected | The value is not assignable to the declared type, the type contains a wildcard/type variable, or null was supplied for a primitive |
-| Immutable value is not populated | Use a record, a valid `JsonCreator`, or an exact custom codec |
-| `JsonValue` read fails | Add one plain `String` `JsonCreator`, or register an exact custom codec |
-| Raw JSON output is invalid | Supply exactly one trusted, complete JSON value to the `JsonRawValue` property |
-| Ordinary object cannot be constructed | Add a usable no-argument constructor, use a record or `JsonCreator`, or register a custom codec; Android and GraalVM native image are stricter |
-| Ordinary accessor annotation fails | The method is not an eligible public JavaBean accessor, or field mode is enabled |
-| Any annotation fails | Use exactly one field-backed form or one valid method-backed pair with resolved `Map<String, V>` types; method annotations require non-field mode |
-| Codec annotation fails | Resolve same-node or hierarchy conflicts, remove a hidden nested override, or use a public no-argument codec class |
-| Subtype is rejected | The base is not declared on the write, the runtime class is not an exact table entry, or the input wire shape differs from the configured inclusion |
-| Collection cannot be read | Target a supported interface/common implementation or register a custom codec |
-| OutputStream write fails | The underlying `IOException` is wrapped as the cause of `ForyJsonException` |
-| Kotlin null or missing member fails | Check the exact `jsonTypeRef`, constructor default, and nullable occurrence; null does not request a compiler default |
-| Raw/star/projected Kotlin generic fails | Supply a complete `jsonTypeRef<T>()`; `in` and star projections cannot reconstruct one exact schema |
-| Unsupported Kotlin metadata | Ensure the resolved `kotlin-metadata-jvm` supports the model compiler's metadata and that validated JVM members match it |
-| Kotlin model fails after Android shrinking | Apply KSP; for an exact Mixin, use it when either its source or target is Kotlin, and verify that the generated rules are packaged |
-| Kotlin model is absent in Native Image | Install `ForyJsonKotlin` from a reachable `ForyJsonProvider`, enable code generation, and make the exact binding reachable from that configuration |
+| Symptom | Likely cause and action |
+| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `ForyJsonException` while parsing | Invalid JSON grammar, type mismatch, unsupported mapping, depth or graph-memory violation, validator failure, or trailing content |
+| `InsecureException` | Fory's disallow list or the configured `JsonTypeChecker` rejected a class |
+| `IllegalArgumentException` from a builder | Check the configured depth, graph-memory, concurrency, retained-buffer, and cached-field-name limits |
+| Declared write is rejected | The value is not assignable to the declared type, the type contains a wildcard/type variable, or null was supplied for a primitive |
+| Immutable value is not populated | Use a record, a valid `JsonCreator`, or an exact custom codec |
+| `JsonValue` read fails | Add one plain `String` `JsonCreator`, or register an exact custom codec |
+| Raw JSON output is invalid | Supply exactly one trusted, complete JSON value to the `JsonRawValue` property |
+| Ordinary object cannot be constructed | Add a usable no-argument constructor, use a record or `JsonCreator`, or register a custom codec; Android and GraalVM native image are stricter |
+| Ordinary accessor annotation fails | The method is not an eligible public JavaBean accessor, or field mode is enabled |
+| Any annotation fails | Use exactly one field-backed form or one valid method-backed pair with resolved `Map<String, V>` types; method annotations require non-field mode |
+| Codec annotation fails | Resolve same-node or hierarchy conflicts, remove a hidden nested override, or use a public no-argument codec class |
+| Subtype is rejected | The base is not declared on the write, the runtime class is not an exact table entry, or the input wire shape differs from the configured inclusion |
+| Collection cannot be read | Target a supported interface/common implementation or register a custom codec |
+| OutputStream write fails | The underlying `IOException` is wrapped as the cause of `ForyJsonException` |
+| Kotlin null or missing member fails | Check the exact `jsonTypeRef`, constructor default, and nullable occurrence; null does not request a compiler default |
+| Raw/star/projected Kotlin generic fails | Supply a complete `jsonTypeRef<T>()`; `in` and star projections cannot reconstruct one exact schema |
+| Kotlin generic fails in a framework converter | Preserve the declared Kotlin `KType` and use `jsonTypeRef<Any?>(kType)`; Java `TypeRef.of(type)` does not restore Kotlin nullability. See [framework integration](integration.md#kotlin-integration) |
+| Unsupported Kotlin metadata | Ensure the resolved `kotlin-metadata-jvm` supports the model compiler's metadata and that validated JVM members match it |
+| Kotlin model fails after Android shrinking | Apply KSP; for an exact Mixin, use it when either its source or target is Kotlin, and verify that the generated rules are packaged |
+| Kotlin model is absent in Native Image | Install `ForyJsonKotlin` from a reachable `ForyJsonProvider`, enable code generation, and make the exact binding reachable from that configuration |
Fory JSON mapping, syntax, codec, depth, graph-memory, validator, and output failures use
`ForyJsonException`. User codec code may still throw its own runtime exception. Creator and
diff --git a/versioned_docs/version-1.7.0/object-serialization/cpp/index.md b/versioned_docs/version-1.7.0/object-serialization/cpp/index.md
index cc2f7630058..66050e74a32 100644
--- a/versioned_docs/version-1.7.0/object-serialization/cpp/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/cpp/index.md
@@ -62,7 +62,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
@@ -92,11 +92,11 @@ module(
bazel_dep(name = "rules_cc", version = "0.1.1")
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
git_override(
module_name = "fory",
remote = "https://github.com/apache/fory.git",
- commit = "v1.7.3", # Or use a specific commit hash for reproducibility
+ commit = "v1.7.4", # Or use a specific commit hash for reproducibility
)
```
@@ -128,7 +128,7 @@ bazel run //:my_app
For local development, you can use `local_path_override` instead:
```bazel
-bazel_dep(name = "fory", version = "1.7.3")
+bazel_dep(name = "fory", version = "1.7.4")
local_path_override(
module_name = "fory",
path = "/path/to/fory",
diff --git a/versioned_docs/version-1.7.0/object-serialization/csharp/index.md b/versioned_docs/version-1.7.0/object-serialization/csharp/index.md
index 957a2dabfd9..603deff64d8 100644
--- a/versioned_docs/version-1.7.0/object-serialization/csharp/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/csharp/index.md
@@ -46,7 +46,7 @@ Reference the single `Apache.Fory` package. It includes the Fory library and the
```xml
<ItemGroup>
- <PackageReference Include="Apache.Fory" Version="1.7.3" />
+ <PackageReference Include="Apache.Fory" Version="1.7.4" />
</ItemGroup>
```
diff --git a/versioned_docs/version-1.7.0/object-serialization/dart/index.md b/versioned_docs/version-1.7.0/object-serialization/dart/index.md
index a08544d4dc2..ca9d6cc2ef6 100644
--- a/versioned_docs/version-1.7.0/object-serialization/dart/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/dart/index.md
@@ -47,7 +47,7 @@ Add the dependency to your `pubspec.yaml`:
```yaml
dependencies:
- fory: ^1.7.3
+ fory: ^1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/versioned_docs/version-1.7.0/object-serialization/java/basic-serialization.md b/versioned_docs/version-1.7.0/object-serialization/java/basic-serialization.md
index 464145215c9..bac8ea7de74 100644
--- a/versioned_docs/version-1.7.0/object-serialization/java/basic-serialization.md
+++ b/versioned_docs/version-1.7.0/object-serialization/java/basic-serialization.md
@@ -289,6 +289,21 @@ Not all Java types have equivalents in other languages. When using xlang mode:
- See [Type Mapping Guide](../../specification/xlang_type_mapping.md) for the complete
compatibility matrix.
+#### Timestamps
+
+In xlang mode (`withXlang(true)`), `java.util.Date` and `java.sql.Date` use the `timestamp` type,
+like `java.time.Instant`: 8 bytes for seconds followed by 4 bytes for nanoseconds. A declared
+`Date` field retains its Java type. A timestamp read without a declared field type, such as a
+dynamic root value, is returned as `Instant`.
+
+`Date` values retain millisecond precision. Reading a timestamp into a `Date` discards
+sub-millisecond precision by rounding down to the preceding millisecond. Timestamps outside
+the signed 64-bit millisecond range cannot be represented as `Date` values.
+
+In Java native mode (`withXlang(false)`), `java.util.Date` and `java.sql.Date` encode the time
+value as an 8-byte signed millisecond count since the Unix epoch. Deserialization preserves
+the original Java type, including for root values.
+
#### Lists and Dense Arrays
Java primitive arrays are dense `array<T>` carriers, except plain `byte[]`,
diff --git a/versioned_docs/version-1.7.0/object-serialization/java/index.md b/versioned_docs/version-1.7.0/object-serialization/java/index.md
index 6fbdd473af3..69d11b0e08c 100644
--- a/versioned_docs/version-1.7.0/object-serialization/java/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/java/index.md
@@ -63,7 +63,7 @@ or later.
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
@@ -71,7 +71,7 @@ or later.
```kotlin
// Binary object serialization
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
#### JDK 25 and Later
diff --git a/versioned_docs/version-1.7.0/object-serialization/java/schema-metadata.md b/versioned_docs/version-1.7.0/object-serialization/java/schema-metadata.md
index 8a1265d84b2..a2d44a7e9d8 100644
--- a/versioned_docs/version-1.7.0/object-serialization/java/schema-metadata.md
+++ b/versioned_docs/version-1.7.0/object-serialization/java/schema-metadata.md
@@ -166,6 +166,10 @@ public class Record {
- When a field is non-nullable, Fory skips writing the null flag.
- Boxed types (`Integer`, `Long`, etc.) that can be null should use `@Nullable`.
+Serialization fails if a field without a null or reference flag contains null. The error identifies
+the field and recommends `@Nullable`. For Java-only serialization, use
+`Fory.builder().withXlang(false)` to make unannotated reference fields nullable by default.
+
## Reference Tracking (`@Ref`)
Enable reference tracking for fields that may be shared or circular:
diff --git a/versioned_docs/version-1.7.0/object-serialization/kotlin/index.md b/versioned_docs/version-1.7.0/object-serialization/kotlin/index.md
index 60115989466..a5ba5e61b47 100644
--- a/versioned_docs/version-1.7.0/object-serialization/kotlin/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/kotlin/index.md
@@ -53,14 +53,14 @@ See [Java Features](../java/index.md#features) for complete feature list.
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
### Gradle
```kotlin
-implementation("org.apache.fory:fory-kotlin:1.7.3")
+implementation("org.apache.fory:fory-kotlin:1.7.4")
```
### JDK25+
diff --git a/versioned_docs/version-1.7.0/object-serialization/rust/basic-serialization.md b/versioned_docs/version-1.7.0/object-serialization/rust/basic-serialization.md
index d9b0e178274..b26fe0c1cb7 100644
--- a/versioned_docs/version-1.7.0/object-serialization/rust/basic-serialization.md
+++ b/versioned_docs/version-1.7.0/object-serialization/rust/basic-serialization.md
@@ -147,7 +147,7 @@ let later = timestamp.checked_add_duration(duration)?;
```toml
[dependencies]
-fory = { version = "1.7.3", features = ["chrono"] }
+fory = { version = "1.7.4", features = ["chrono"] }
```
### Custom Types
diff --git a/versioned_docs/version-1.7.0/object-serialization/rust/index.md b/versioned_docs/version-1.7.0/object-serialization/rust/index.md
index 19f7b236e4f..eaba9f73a52 100644
--- a/versioned_docs/version-1.7.0/object-serialization/rust/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/rust/index.md
@@ -37,9 +37,9 @@ The Rust implementation provides versatile and high-performance serialization wi
| Crate | Description | Version |
| --------------------------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------- |
-| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | User-facing API, public Fory types, and derive macros | [1.7.3](https://crates.io/crates/fory) |
-| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | Lower-level core crate for advanced integrations | [1.7.3](https://crates.io/crates/fory-core) |
-| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | Procedural macro crate for direct derive-macro use | [1.7.3](https://crates.io/crates/fory-derive) |
+| [`fory`](https://github.com/apache/fory/blob/main/rust/fory) | User-facing API, public Fory types, and derive macros | [1.7.4](https://crates.io/crates/fory) |
+| [`fory-core`](https://github.com/apache/fory/blob/main/rust/fory-core/) | Lower-level core crate for advanced integrations | [1.7.4](https://crates.io/crates/fory-core) |
+| [`fory-derive`](https://github.com/apache/fory/blob/main/rust/fory-derive/) | Procedural macro crate for direct derive-macro use | [1.7.4](https://crates.io/crates/fory-derive) |
Most applications should depend on `fory` only. It re-exports the derive
macros and the public Fory types needed by generated code. Use `fory-core`
@@ -52,7 +52,7 @@ Add Apache Fory™ to your `Cargo.toml`:
```toml
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
### Basic Example
diff --git a/versioned_docs/version-1.7.0/object-serialization/scala/index.md b/versioned_docs/version-1.7.0/object-serialization/scala/index.md
index d9908b1cfe6..edc61814969 100644
--- a/versioned_docs/version-1.7.0/object-serialization/scala/index.md
+++ b/versioned_docs/version-1.7.0/object-serialization/scala/index.md
@@ -49,7 +49,7 @@ See [Java Features](../java/index.md#features) for complete feature list.
Add the dependency with sbt:
```sbt
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
### JDK25+
diff --git a/versioned_docs/version-1.7.0/row-format/java.md b/versioned_docs/version-1.7.0/row-format/java.md
index 0349bc95e9b..846df1db7ef 100644
--- a/versioned_docs/version-1.7.0/row-format/java.md
+++ b/versioned_docs/version-1.7.0/row-format/java.md
@@ -43,14 +43,14 @@ For Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-format</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
For Gradle:
```kotlin
-implementation("org.apache.fory:fory-format:1.7.3")
+implementation("org.apache.fory:fory-format:1.7.4")
```
## Basic Usage
diff --git a/versioned_docs/version-1.7.0/specification/xlang_type_mapping.md b/versioned_docs/version-1.7.0/specification/xlang_type_mapping.md
index aa89ae8a852..683b656fa00 100644
--- a/versioned_docs/version-1.7.0/specification/xlang_type_mapping.md
+++ b/versioned_docs/version-1.7.0/specification/xlang_type_mapping.md
@@ -121,6 +121,9 @@ Notes:
- Python `pyfory.Float16` and `pyfory.BFloat16` are reserved annotation markers; scalar values deserialize as native Python `float`.
- Python `BoolArray`, `Int8Array`, `Int16Array`, `Int32Array`, `Int64Array`, `UInt8Array`, `UInt16Array`, `UInt32Array`, `UInt64Array`, `Float16Array`, `BFloat16Array`, `Float32Array`, and `Float64Array` are public dense-array wrappers with list-like sequence behavior.
- JavaScript `BoolArray`, fallback `Float16Array`, and `BFloat16Array` are public dense-array wrappers backed by `Uint8Array` or `Uint16Array`. Scalar `float16` and `bfloat16` values use `number`. A JavaScript environment with native `Float16Array` may return that native carrier for `array<float16>`.
+- Java `java.util.Date` and `java.sql.Date` also map to `timestamp` using seconds and nanoseconds.
+ Declared fields retain their Java carrier type; dynamic timestamp values use `Instant`.
+ Date carriers retain millisecond precision and round timestamp reads down to milliseconds.
- Java plain `byte[]` maps to `binary`. Numeric byte arrays use type-use annotations:
`@Int8Type byte[]` for `array<int8>` and `@UInt8Type byte[]` for `array<uint8>`.
- Dart uses `double` plus `Float16Type` or `Bfloat16Type` metadata for scalar
diff --git a/versioned_docs/version-1.7.0/start/cpp.md b/versioned_docs/version-1.7.0/start/cpp.md
index aeeff27abf3..9efa5a1b97d 100644
--- a/versioned_docs/version-1.7.0/start/cpp.md
+++ b/versioned_docs/version-1.7.0/start/cpp.md
@@ -45,7 +45,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
- GIT_TAG v1.7.3
+ GIT_TAG v1.7.4
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
diff --git a/versioned_docs/version-1.7.0/start/csharp.md b/versioned_docs/version-1.7.0/start/csharp.md
index 94df569c9e4..5562e6372a6 100644
--- a/versioned_docs/version-1.7.0/start/csharp.md
+++ b/versioned_docs/version-1.7.0/start/csharp.md
@@ -36,7 +36,7 @@ Create a console project and add the released package:
```bash
dotnet new console -n ForyExample
cd ForyExample
-dotnet add package Apache.Fory --version 1.7.3
+dotnet add package Apache.Fory --version 1.7.4
```
Replace `Program.cs` with:
diff --git a/versioned_docs/version-1.7.0/start/dart.md b/versioned_docs/version-1.7.0/start/dart.md
index 01b1335c4de..d301e6d90d5 100644
--- a/versioned_docs/version-1.7.0/start/dart.md
+++ b/versioned_docs/version-1.7.0/start/dart.md
@@ -36,7 +36,7 @@ Add Fory and the generator to `pubspec.yaml`:
```yaml
dependencies:
- fory: 1.7.3
+ fory: 1.7.4
dev_dependencies:
build_runner: ^2.4.0
diff --git a/versioned_docs/version-1.7.0/start/go.md b/versioned_docs/version-1.7.0/start/go.md
index 3dbe1df99b8..159215aec82 100644
--- a/versioned_docs/version-1.7.0/start/go.md
+++ b/versioned_docs/version-1.7.0/start/go.md
@@ -38,7 +38,7 @@ Create a module and install the released Fory module:
mkdir fory-example
cd fory-example
go mod init example.com/fory-example
-go get github.com/apache/fory/go/fory@v1.7.3
+go get github.com/apache/fory/go/fory@v1.7.4
```
If a Go proxy has not picked up a new submodule tag yet, retry later or use
diff --git a/versioned_docs/version-1.7.0/start/java.md b/versioned_docs/version-1.7.0/start/java.md
index 907631e9eb0..0f3561ad712 100644
--- a/versioned_docs/version-1.7.0/start/java.md
+++ b/versioned_docs/version-1.7.0/start/java.md
@@ -44,14 +44,14 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
- <version>1.7.3</version>
+ <version>1.7.4</version>
</dependency>
```
Gradle:
```kotlin
-implementation("org.apache.fory:fory-core:1.7.3")
+implementation("org.apache.fory:fory-core:1.7.4")
```
Run this complete xlang round trip:
@@ -97,7 +97,7 @@ Fory JSON maps Java objects to standard JSON text and UTF-8 bytes. Add
`fory-json` instead of `fory-core` when the application only needs JSON:
```kotlin
-implementation("org.apache.fory:fory-json:1.7.3")
+implementation("org.apache.fory:fory-json:1.7.4")
```
Add the import to `ForyExample.java`:
diff --git a/versioned_docs/version-1.7.0/start/javascript.md b/versioned_docs/version-1.7.0/start/javascript.md
index 1fee9709c59..61f35e43161 100644
--- a/versioned_docs/version-1.7.0/start/javascript.md
+++ b/versioned_docs/version-1.7.0/start/javascript.md
@@ -36,7 +36,7 @@ npm --version
Install the core package:
```bash
-npm install @apache-fory/core@1.7.3
+npm install @apache-fory/core@1.7.4
```
Define a schema and run an xlang round trip:
@@ -72,7 +72,7 @@ JavaScript uses xlang mode. Continue with
For the optional Node.js string fast path, install the matching package version:
```bash
-npm install @apache-fory/core@1.7.3 @apache-fory/hps@1.7.3
+npm install @apache-fory/core@1.7.4 @apache-fory/hps@1.7.4
```
## Other Capabilities
diff --git a/versioned_docs/version-1.7.0/start/kotlin.md b/versioned_docs/version-1.7.0/start/kotlin.md
index 9775d65b8ef..7230f96810e 100644
--- a/versioned_docs/version-1.7.0/start/kotlin.md
+++ b/versioned_docs/version-1.7.0/start/kotlin.md
@@ -44,7 +44,7 @@ repositories {
}
dependencies {
- implementation("org.apache.fory:fory-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-kotlin:1.7.4")
}
```
@@ -88,7 +88,7 @@ module when interoperating with ordinary JSON APIs, browsers, logs, or other JSO
```kotlin title="build.gradle.kts"
dependencies {
- implementation("org.apache.fory:fory-json-kotlin:1.7.3")
+ implementation("org.apache.fory:fory-json-kotlin:1.7.4")
}
```
diff --git a/versioned_docs/version-1.7.0/start/python.md b/versioned_docs/version-1.7.0/start/python.md
index b4ec2096206..98edf7f3867 100644
--- a/versioned_docs/version-1.7.0/start/python.md
+++ b/versioned_docs/version-1.7.0/start/python.md
@@ -35,7 +35,7 @@ python -m pip --version
Install the released package:
```bash
-python -m pip install pyfory==1.7.3
+python -m pip install pyfory==1.7.4
```
Run an xlang round trip:
diff --git a/versioned_docs/version-1.7.0/start/rust.md b/versioned_docs/version-1.7.0/start/rust.md
index 07077d77abd..0ff8cc25a0a 100644
--- a/versioned_docs/version-1.7.0/start/rust.md
+++ b/versioned_docs/version-1.7.0/start/rust.md
@@ -36,7 +36,7 @@ Add the public crate:
```toml title="Cargo.toml"
[dependencies]
-fory = "1.7.3"
+fory = "1.7.4"
```
```rust
diff --git a/versioned_docs/version-1.7.0/start/scala.md b/versioned_docs/version-1.7.0/start/scala.md
index c57d548cdfe..24404d1f196 100644
--- a/versioned_docs/version-1.7.0/start/scala.md
+++ b/versioned_docs/version-1.7.0/start/scala.md
@@ -37,7 +37,7 @@ Add the Fory Scala library to `build.sbt`:
```sbt
ThisBuild / scalaVersion := "3.3.1"
-libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.3"
+libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.4"
```
Create `src/main/scala/ScalaExample.scala`:
diff --git a/versioned_docs/version-1.7.0/start/swift.md b/versioned_docs/version-1.7.0/start/swift.md
index eed11e9d477..ae515626c4a 100644
--- a/versioned_docs/version-1.7.0/start/swift.md
+++ b/versioned_docs/version-1.7.0/start/swift.md
@@ -42,7 +42,7 @@ Add the released package and depend on its `Fory` library in the generated `Pack
```swift title="Package.swift"
dependencies: [
- .package(url: "https://github.com/apache/fory.git", exact: "1.7.3")
+ .package(url: "https://github.com/apache/fory.git", exact: "1.7.4")
],
targets: [
.executableTarget(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org