Skip to content
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

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

rustagir
Copy link
Collaborator

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

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Aug 20, 2024

👷 Deploy request for docs-kotlin-sync pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8e63a76

Copy link
Collaborator

@mcmorisi mcmorisi left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``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()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
method and add it to the registry.
method and adding it to the registry.

.firstOrNull()
println(resultTeacher)

val resultStudent =collection.withDocumentClass<Student>()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val resultStudent =collection.withDocumentClass<Student>()
val resultStudent = collection.withDocumentClass<Student>()

@rustagir rustagir requested a review from rozza August 20, 2024 19:31
Copy link
Member

@rozza rozza left a 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.

@rustagir rustagir requested a review from rozza August 21, 2024 14:14
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rustagir rustagir merged commit ef426ee into mongodb:master Aug 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants