-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-42666: serialization #39
Conversation
👷 Deploy request for docs-kotlin-sync pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some tiny nits!
-------------------------------------------------- | ||
|
||
You must install the official {+language+} serialization library, | ||
``kotlinx.serialization`` to serialize and deserialize data in your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``kotlinx.serialization`` to serialize and deserialize data in your | |
``kotlinx.serialization``, to serialize and deserialize data in your |
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, you can define your codec by using the `KotlinSerializerCodec.create() | |
You can define your codec by using the `KotlinSerializerCodec.create() |
|
||
Then, 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method and add it to the registry. | |
method and adding it to the registry. |
.firstOrNull() | ||
println(resultTeacher) | ||
|
||
val resultStudent =collection.withDocumentClass<Student>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val resultStudent =collection.withDocumentClass<Student>() | |
val resultStudent = collection.withDocumentClass<Student>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend using the https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/fundamentals/data-formats/serialization/ page wholesale.
Its important to have the differentiation between kotlinx serialization and using codecs. Which appears to be missing from this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-42666
Staging - https://preview-mongodbrustagir.gatsbyjs.io/kotlin-sync/DOCSP-42666-serialization/data-formats/serialization/
Self-Review Checklist