• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:long +full:- +full:file +full:- +full:names

1 <!--- TEST_NAME BuiltinClassesTest -->
5 This is the second chapter of the [Kotlin Serialization Guide](serialization-guide.md).
11 <!--- TOC -->
15 * [Long numbers](#long-numbers)
16 * [Long numbers as strings](#long-numbers-as-strings)
17 * [Enum classes](#enum-classes)
18 * [Serial names of enum entries](#serial-names-of-enum-entries)
20 * [Pair and triple](#pair-and-triple)
22 * [Sets and other collections](#sets-and-other-collections)
23 * [Deserializing collections](#deserializing-collections)
25 * [Unit and singleton objects](#unit-and-singleton-objects)
29 <!--- END -->
31 <!--- INCLUDE .*-builtin-.*
34 -->
39 `Boolean`, `Byte`, `Short`, `Int`, `Long`, `Float`, `Double`, `Char`, `String`, and enums.
44 All types of integer and floating-point Kotlin numbers can be serialized.
46 <!--- INCLUDE
48 -->
63 > You can get the full code [here](../guide/example/example-builtin-01.kt).
71 <!--- TEST -->
74 ### Long numbers
76 Long integers are serializable, too.
80 class Data(val signature: Long)
88 > You can get the full code [here](../guide/example/example-builtin-02.kt).
96 <!--- TEST -->
98 ### Long numbers as strings
108 The full range of a Kotlin Long does not fit in the JavaScript number, so its precision gets lost i…
109 A common workaround is to represent long numbers with full precision using the JSON string type.
111 can be specified for a given Long property using the [`@Serializable`][Serializable] annotation:
113 <!--- INCLUDE
115 -->
121 val signature: Long
130 > You can get the full code [here](../guide/example/example-builtin-03.kt).
138 > The section on [Specifying serializers for a file](serializers.md#specifying-serializers-for-a-fi…
139 > serializer like `LongAsStringSerializer` can be specified for all properties in a file.
141 <!--- TEST -->
161 > You can get the full code [here](../guide/example/example-builtin-04.kt).
171 <!--- TEST -->
173 ### Serial names of enum entries
175 Serial names of enum entries can be customized with the [SerialName] annotation just like
176 it was shown for properties in the [Serial field names](basic-serialization.md#serial-field-names) …
192 > You can get the full code [here](../guide/example/example-builtin-05.kt).
200 <!--- TEST -->
220 > You can get the full code [here](../guide/example/example-builtin-06.kt).
226 <!--- TEST -->
248 > You can get the full code [here](../guide/example/example-builtin-07.kt).
256 <!--- TEST -->
275 > You can get the full code [here](../guide/example/example-builtin-08.kt).
283 <!--- TEST -->
310 > You can get the full code [here](../guide/example/example-builtin-09.kt).
318 <!--- TEST -->
337 > You can get the full code [here](../guide/example/example-builtin-10.kt).
346 <!--- TEST -->
348 > It is a JSON-specific limitation that keys cannot be composite.
349 > It can be lifted as shown in the [Allowing structured map keys](json.md#allowing-structured-map-k…
355 …ingleton object](https://kotlinlang.org/docs/tutorials/kotlin-for-py/objects-and-companion-objects…
373 > You can get the full code [here](../guide/example/example-builtin-11.kt).
383 <!--- TEST -->
386 > e.g. using their fully-qualified names.
392 <!--- INCLUDE
394 -->
402 > You can get the full code [here](../guide/example/example-builtin-12.kt).
404 Duration is serialized as a string in the ISO-8601-2 format.
409 <!--- TEST -->
414 …no instances of this class, it is impossible to encode or decode its values - any attempt will cau…
428 > You can get the full code [here](../guide/example/example-builtin-13.kt).
436 <!--- TEST -->
438 ---
442 <!-- stdlib references -->
443 [Double.NaN]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/-na-n.html
444 [Pair]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/
445 [Triple]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-triple/
446 [Regex]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/
447 [List]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/
448 [Set]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/
449 [Map]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/
450 [Duration]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-duration/
451 [Nothing]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing.html
453 <!--- MODULE /kotlinx-serialization-core -->
454 <!--- INDEX kotlinx-serialization-core/kotlinx.serialization -->
456 …ttps://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-
457 …://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-seri…
459 <!--- MODULE /kotlinx-serialization-core -->
460 <!--- INDEX kotlinx-serialization-core/kotlinx.serialization.builtins -->
462 …nlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization.builtins/-lon…
464 <!--- END -->