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.git
The following commit(s) were added to refs/heads/main by this push: new a9e5d999 fix: tidy up issues in scala_guide.md (#2374) a9e5d999 is described below commit a9e5d999f58b2a0ec8f22ead9a20040d45e39a73 Author: PJ Fanning <pjfann...@users.noreply.github.com> AuthorDate: Fri Jul 4 02:23:48 2025 +0100 fix: tidy up issues in scala_guide.md (#2374) <!-- **Thanks for contributing to Fory.** **If this is your first time opening a PR on fory, you can refer to [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).** Contribution Checklist - The **Apache Fory (incubating)** community has restrictions on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md). - Fory has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here. --> ## What does this PR do? <!-- Describe the purpose of this PR. --> ## Related issues <!-- Is there any related issue? Please attach here. - #xxxx0 - #xxxx1 - #xxxx2 --> ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fory/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. --> --- docs/guide/scala_guide.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/guide/scala_guide.md b/docs/guide/scala_guide.md index 1969ebf5..b3576492 100644 --- a/docs/guide/scala_guide.md +++ b/docs/guide/scala_guide.md @@ -31,19 +31,13 @@ Scala 2 and 3 are both supported. ## Install -To add a dependency on Fory scala for scala 2 with sbt, use the following: +To add a dependency on Fory scala for with sbt, use the following: ```sbt -libraryDependencies += "org.apache.fory" % "fory-scala_2.13" % "0.11.1" +libraryDependencies += "org.apache.fory" %% "fory-scala" % "0.11.1" ``` -To add a dependency on Fory scala for scala 3 with sbt, use the following: - -```sbt -libraryDependencies += "org.apache.fory" % "fory-scala_3" % "0.11.1" -``` - -## Quict Start +## Quick Start ```scala case class Person(name: String, id: Long, github: String) @@ -93,7 +87,7 @@ Note that fory instance should be shared between multiple serialization, the cre If you use shared fory instance across multiple threads, you should create `ThreadSafeFory` instead by `ForyBuilder#buildThreadSafeFory()` instead. -## Serialize case object +## Serialize case class ```scala case class Person(github: String, age: Int, id: Long) @@ -135,9 +129,9 @@ println(fory.deserialize(fory.serialize(map))) ## Serialize Tuple ```scala -val tuple = Tuple2(100, 10000L) +val tuple = (100, 10000L) //Tuple2 println(fory.deserialize(fory.serialize(tuple))) -val tuple = Tuple4(100, 10000L, 10000L, "str") +val tuple = (100, 10000L, 10000L, "str") //Tuple4 println(fory.deserialize(fory.serialize(tuple))) ``` --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@fory.apache.org For additional commands, e-mail: commits-h...@fory.apache.org