You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by ch...@apache.org on 2026/08/31 06:16:48 UTC
(fory-site) branch main updated (c04c4252761 -> cc328c638a7)
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
from c04c4252761 docs: use User in release blog Kotlin examples (#498)
new 6d71507873d 🔄 synced local 'docs/benchmarks/' with remote 'docs/benchmarks/'
new cc328c638a7 🔄 synced local 'docs/json/' with remote 'docs/json/'
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/benchmarks/index.md | 6 ++++--
docs/benchmarks/json/kotlin/README.md | 12 ++++++++++--
docs/json/kotlin.md | 11 +++++++++--
docs/json/object-mapping.md | 9 +++++++++
docs/json/scala.md | 5 +++++
5 files changed, 37 insertions(+), 6 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
(fory-site) 02/02: 🔄 synced local 'docs/json/' with remote 'docs/json/'
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit cc328c638a778bfb695a12d649da7f9ccd8c60a9
Author: chaokunyang <sh...@gmail.com>
AuthorDate: Mon Aug 31 06:16:43 2026 +0000
🔄 synced local 'docs/json/' with remote 'docs/json/'
---
docs/json/kotlin.md | 11 +++++++++--
docs/json/object-mapping.md | 9 +++++++++
docs/json/scala.md | 5 +++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/docs/json/kotlin.md b/docs/json/kotlin.md
index 0d004a3433f..4b6bc182200 100644
--- a/docs/json/kotlin.md
+++ b/docs/json/kotlin.md
@@ -87,6 +87,12 @@ val text = json.toJson(Account(7u, "Alice"), accountType)
val decoded = json.fromJson(text, accountType)
```
+Use `ForyJsonKotlin.builder().writeLongAsString(true)` when signed `Long` and unsigned `ULong`
+values must be emitted as quoted decimal strings. The setting also applies to their declared
+collection and map values, nullable values, Kotlin value classes backed by them, `ULongArray`, and
+the Java Long-like wrappers supported by the core JSON runtime. Readers accept both quoted and
+unquoted integer tokens.
+
`jsonTypeRef<T>()` is a type token, not a codec lookup. Construct it once and reuse it. A Java
`Class` or ordinary Java `TypeRef` cannot express distinctions such as `List<Account?>`, `UInt`, or
a logical value class lowered to a primitive carrier.
@@ -363,5 +369,6 @@ See [Troubleshooting](troubleshooting.md) for Kotlin metadata, nullability, gene
Android shrinking, Native Image, syntax, limits, custom codecs, subtypes, and root-operation
failures.
-See [Kotlin JSON benchmarks](../benchmarks/json/kotlin/README.md) for the workloads and setup
-used to compare Fory JSON Kotlin, kotlinx.serialization, Moshi, and Jackson Kotlin.
+The source-aligned four-library benchmark methodology and publication status are in the
+[Kotlin JSON benchmark report](../benchmarks/json/kotlin/README.md). No Kotlin result is inferred
+from the Java or Scala benchmark.
diff --git a/docs/json/object-mapping.md b/docs/json/object-mapping.md
index e64b7116b1a..537c8486086 100644
--- a/docs/json/object-mapping.md
+++ b/docs/json/object-mapping.md
@@ -215,6 +215,7 @@ original key type. Null map keys are rejected.
| Builder method | Default | User-visible effect |
| -------------------------------------- | ----------------------------------------- | ---------------------------------------------------------- |
| `writeNullFields(boolean)` | `false` | Default inclusion of null object properties |
+| `writeLongAsString(boolean)` | `false` | Write built-in 64-bit integer values as decimal strings |
| `withCodegen(boolean)` | `true` | Enable generated object codecs |
| `withAsyncCompilation(boolean)` | `true` | Compile generated codecs asynchronously |
| `withFieldMode(boolean)` | `false` | When true, discover fields without getters/setters |
@@ -225,6 +226,14 @@ original key type. Null map keys are rejected.
| `registerCodec(type, codec)` | None | Replace an eligible exact class's complete JSON codec |
| `registerMixin(mixinType)` | None | Apply one annotation Mixin to its exact declared target |
+Enable `writeLongAsString(true)` when 64-bit integer values must pass through JavaScript without
+`Number` precision loss. The setting writes built-in `long`/`Long`, `AtomicLong`,
+`AtomicLongArray`, and `OptionalLong` values as quoted decimal strings. It also follows declared
+Long children through arrays, collections, map values, `Optional<Long>`, `AtomicReference<Long>`,
+and equivalent language-module containers. Readers accept both numeric and quoted integer tokens
+regardless of this setting. Custom codecs and occurrence-level codec or format annotations retain
+their own output shape.
+
Concurrency-level and buffer-retention limits must be positive. The cached-field-name limit
applies independently to each reader; zero disables this cache. It bounds only cached field names,
not names accepted from the input. The buffer-retention setting does not limit JSON input or output
diff --git a/docs/json/scala.md b/docs/json/scala.md
index 04b9637f31a..f1bdf4a574d 100644
--- a/docs/json/scala.md
+++ b/docs/json/scala.md
@@ -41,6 +41,11 @@ val person = json.fromJson(text, classOf[Person])
```
Reuse the resulting `ForyJson` instance. It is immutable and thread-safe after construction.
+Use `ForyJsonScala.builder().writeLongAsString(true)` to emit Scala `Long` values, including
+declared collection and map values, `Option[Long]`, `Long`-backed value classes, and Java Long-like
+wrappers as quoted decimal strings. Readers accept both quoted and unquoted integer tokens.
+Use `ScalaTypeRef` when a parameterized declaration contains `Long` because normal JVM signatures
+can erase Scala value-type arguments to `Object`.
## Case classes and annotations
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
(fory-site) 01/02: 🔄 synced local 'docs/benchmarks/' with remote 'docs/benchmarks/'
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit 6d71507873d02f25024fa62c82734bd009c2dce2
Author: chaokunyang <sh...@gmail.com>
AuthorDate: Mon Aug 31 06:16:43 2026 +0000
🔄 synced local 'docs/benchmarks/' with remote 'docs/benchmarks/'
---
docs/benchmarks/index.md | 6 ++++--
docs/benchmarks/json/kotlin/README.md | 12 ++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/docs/benchmarks/index.md b/docs/benchmarks/index.md
index 622bac1b725..fd940fac3e2 100644
--- a/docs/benchmarks/index.md
+++ b/docs/benchmarks/index.md
@@ -52,8 +52,10 @@ For additional benchmark notes, raw data, and the complete Java benchmark README
## Kotlin JSON Benchmark
The Kotlin JSON harness compares Fory JSON Kotlin, kotlinx.serialization, Moshi, and Jackson Kotlin
-with one immutable model and 16 String/UTF-8 operations. See [Kotlin JSON benchmarks](json/kotlin/README.md)
-for the workloads and benchmark setup.
+with one immutable model and 16 isolated String/UTF-8 operations. The
+[Kotlin JSON report](json/kotlin/README.md) is intentionally marked pending until a complete
+measured run is published; no placeholder performance result is inferred from another language or
+project.
## Python Benchmark
diff --git a/docs/benchmarks/json/kotlin/README.md b/docs/benchmarks/json/kotlin/README.md
index 4d430099a78..02220e384f0 100644
--- a/docs/benchmarks/json/kotlin/README.md
+++ b/docs/benchmarks/json/kotlin/README.md
@@ -1,6 +1,10 @@
-# Kotlin JSON Benchmarks
+# Kotlin JSON Benchmark Report
-The benchmark harness is in
+Measured results are pending. This page will be replaced only by a complete run of the repository
+Kotlin JSON benchmark harness; no performance number or chart is inferred from the Java, Scala, or
+historical external benchmark projects.
+
+The source-aligned harness is in
[`benchmarks/kotlin`](https://github.com/apache/fory/tree/main/benchmarks/kotlin).
It compares Fory JSON Kotlin, kotlinx.serialization, Moshi, and Jackson Kotlin with:
@@ -12,3 +16,7 @@ It compares Fory JSON Kotlin, kotlinx.serialization, Moshi, and Jackson Kotlin w
- one standard JMH invocation for all 16 methods;
- retained declared-type serializers, adapters, readers, and writers prepared outside timing;
- fixture decode, own-output round-trip, and all-output JSON-tree equivalence checks before timing.
+
+The eventual measured report will record the source revision, date, hardware, operating system,
+JDK, Kotlin, JMH, Moshi codegen KSP plugin, library versions, and the exact benchmark settings.
+Standard JMH JSON and the process log remain available together.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org