diff --git a/source/data-formats/serialization.txt b/source/data-formats/serialization.txt index e07b79a..4cb3c47 100644 --- a/source/data-formats/serialization.txt +++ b/source/data-formats/serialization.txt @@ -59,7 +59,7 @@ Add the Serialization Dependencies to Your Project -------------------------------------------------- You must install the official {+language+} serialization library, -``kotlinx.serialization`` to serialize and deserialize data in your +``kotlinx.serialization``, to serialize and deserialize data in your application. To learn more about this library, see the `kotlinx.serialization GitHub repository `__. @@ -209,9 +209,9 @@ To create a custom codec, your project must have the ``bson-kotlinx`` dependency. See the :ref:`kotlin-sync-add-serialization` section of this guide for installation instructions. -Then, you can define your codec by using the `KotlinSerializerCodec.create() +You can define your codec by using the `KotlinSerializerCodec.create() <{+java-api+}/apidocs/bson-kotlinx/bson-kotlinx/org.bson.codecs.kotlinx/-kotlin-serializer-codec/-companion/index.html>`__ -method and add it to the registry. +method, then you can add the codec to the registry. Custom Codec Example ~~~~~~~~~~~~~~~~~~~~ diff --git a/source/includes/data-formats/serialization.kt b/source/includes/data-formats/serialization.kt index ff1a689..b942c37 100644 --- a/source/includes/data-formats/serialization.kt +++ b/source/includes/data-formats/serialization.kt @@ -108,7 +108,7 @@ fun main() { .firstOrNull() println(resultTeacher) - val resultStudent =collection.withDocumentClass() + val resultStudent = collection.withDocumentClass() .find(Filters.exists("grade")) .firstOrNull() println(resultStudent)