Skip to content

Commit b1281e5

Browse files
committed
MW suggestion
2 parents 760109a + 5854886 commit b1281e5

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

source/fundamentals/data-formats/serialization.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,12 @@ the ``Appointment`` data class with the following behavior:
360360
- ``name``: The driver serializes the value as a string.
361361

362362
- ``date``: The driver uses the ``kotlinx-datetime`` serializer
363-
because the field has the ``@Contextual`` annotation. So,
364-
``LocalDate`` values are serialized as BSON dates.
363+
because the field has the ``@Contextual`` annotation. ``LocalDate``
364+
values are serialized as BSON dates.
365365

366366
- ``time``: The driver serializes the value as a string because it does
367-
not have the ``@Contextual`` annotation.
367+
not have the ``@Contextual`` annotation. This is the default
368+
serialization behavior for ``LocalTime`` values.
368369

369370
.. literalinclude:: /examples/generated/KotlinXSerializationTest.snippet.datetime-data-class.kt
370371
:language: kotlin

source/usage-examples/facets.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[facets]]
2+
category = "genre"
3+
value = "tutorial"

source/whats-new.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ improvements, and fixes:
4141
:ref:`kotlin-datetime-serialization` section of the {+language+}
4242
Serialization guide.
4343

44+
- Supports serialization of `JsonElement
45+
<{+kotlin-docs+}/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/>`__
46+
values. To work with the ``JsonElement`` type, you must add the
47+
``kotlinx-serialization-json`` library as a dependency in your
48+
application.
49+
4450
.. _kotlin-coroutine-version-5.1.3:
4551

4652
What's New in 5.1.3

0 commit comments

Comments
 (0)