Skip to content

Commit 4ac1cf7

Browse files
committed
Update the docs to mention the default serializers
1 parent 5e81277 commit 4ac1cf7

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

core/common/src/Instant.kt

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ import kotlin.time.*
188188
* ```
189189
*
190190
* Additionally, there are several `kotlinx-serialization` serializers for [Instant]:
191+
* - The default serializer, delegating to [toString] and [parse].
191192
* - [InstantIso8601Serializer] for the ISO 8601 extended format.
192193
* - [InstantComponentSerializer] for an object with components.
193194
*

core/common/src/LocalDate.kt

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import kotlinx.serialization.Serializable
5656
* See sample 4.
5757
*
5858
* Additionally, there are several `kotlinx-serialization` serializers for [LocalDate]:
59+
* - The default serializer, delegating to [toString] and [parse].
5960
* - [LocalDateIso8601Serializer] for the ISO 8601 extended format.
6061
* - [LocalDateComponentSerializer] for an object with components.
6162
*

core/common/src/LocalDateTime.kt

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import kotlinx.serialization.Serializable
9393
* See sample 4.
9494
*
9595
* Additionally, there are several `kotlinx-serialization` serializers for [LocalDateTime]:
96+
* - The default serializer, delegating to [toString] and [parse].
9697
* - [LocalDateTimeIso8601Serializer] for the ISO 8601 extended format.
9798
* - [LocalDateTimeComponentSerializer] for an object with components.
9899
*

core/common/src/LocalTime.kt

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import kotlinx.serialization.Serializable
6767
* See sample 4.
6868
*
6969
* Additionally, there are several `kotlinx-serialization` serializers for [LocalTime]:
70+
* - The default serializer, delegating to [toString] and [parse].
7071
* - [LocalTimeIso8601Serializer] for the ISO 8601 extended format,
7172
* - [LocalTimeComponentSerializer] for an object with components.
7273
*

core/common/src/UtcOffset.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ import kotlinx.serialization.Serializable
4747
* [parse] and [UtcOffset.format] both support custom formats created with [Format] or defined in [Formats].
4848
* See sample 3.
4949
*
50-
* To serialize and deserialize [UtcOffset] values with `kotlinx-serialization`, use the [UtcOffsetSerializer].
50+
* To serialize and deserialize [UtcOffset] values with `kotlinx-serialization`, use the default serializer,
51+
* or [UtcOffsetIso8601Serializer] for explicit ISO 8601 format.
5152
*
5253
* @sample kotlinx.datetime.test.samples.UtcOffsetSamples.construction
5354
* @sample kotlinx.datetime.test.samples.UtcOffsetSamples.simpleParsingAndFormatting

0 commit comments

Comments
 (0)