-
Notifications
You must be signed in to change notification settings - Fork 662
update: first update for serialization documentation restructuring #2978
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
update: first update for serialization documentation restructuring #2978
Conversation
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.
You want to be accurate in how serialization works. The "intermediate data" representation is misleading, an intermediate format is fundamentally impossible (even without supporting format specific escape hatches such as JsonPolymorphicSerializer
)
docs/topics/serialization.md
Outdated
|
||
## Kotlin serialization libraries | ||
|
||
The `kotlinx.serialization` library offers support for all platforms, including JVM, JavaScript, Native. |
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.
It may be worthwhile to clarify more that the serialization library provides the format agnostic infrastructure. Then the -json
and -cbor
libraries are format implementations (they are fundamentally different and are independent even though first-party).
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.
I added some further comments. It may be that some of them are better used in other pages (not in this request)
4e69cdf
to
85abee7
Compare
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.
Nice work!
I have some suggestions to make it more polished 🚀
docs-website/topics/serialization.md
Outdated
[//]: # (title: Serialization) | ||
|
||
**Serialization** is the process of converting data used by an application to a format that can be transferred over a | ||
network or stored in a database or a file. Deserialization is the opposite process of converting external data back into a runtime object. |
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.
network or stored in a database or a file. Deserialization is the opposite process of converting external data back into a runtime object. | |
network, or stored in a database or a file. Deserialization is the opposite process of converting external data back into a runtime object. |
docs-website/topics/serialization.md
Outdated
network or stored in a database or a file. Deserialization is the opposite process of converting external data back into a runtime object. | ||
Together, they are essential to most applications that exchange data with third parties. | ||
|
||
Some data serialization formats, such as [JSON](https://www.json.org/json-en.html) and [Protocol Buffers](https://protobuf.dev/) are particularly common. |
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.
Some data serialization formats, such as [JSON](https://www.json.org/json-en.html) and [Protocol Buffers](https://protobuf.dev/) are particularly common. | |
Some data serialization formats, such as [JSON](https://www.json.org/json-en.html) and [Protocol Buffers](https://protobuf.dev/), are particularly common. |
docs-website/topics/serialization.md
Outdated
Together, they are essential to most applications that exchange data with third parties. | ||
|
||
Some data serialization formats, such as [JSON](https://www.json.org/json-en.html) and [Protocol Buffers](https://protobuf.dev/) are particularly common. | ||
Being language-neutral and platform-neutral, these formats enable data exchange between systems written in any modern language. |
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.
Being language-neutral and platform-neutral, these formats enable data exchange between systems written in any modern language. | |
These formats are language- and platform-neutral, so you can use them to exchange data between systems written in any modern language. |
I think this reads more clearly if we talk about formats first. WDYT?
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.
I like it 👍
docs-website/topics/serialization.md
Outdated
|
||
## Kotlin serialization libraries | ||
|
||
The `kotlinx.serialization` library offers support for all platforms, including JVM, JavaScript, Native. |
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.
The `kotlinx.serialization` library offers support for all platforms, including JVM, JavaScript, Native. | |
The `kotlinx.serialization` libraries offer support for all platforms, including the JVM, JavaScript, and Native platforms. |
docs-website/topics/serialization.md
Outdated
* [Properties](https://en.wikipedia.org/wiki/.properties): [`kotlinx-serialization-properties`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#properties) | ||
* [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md): [`kotlinx-serialization-hocon`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#hocon) (only on JVM) | ||
|
||
All libraries except JSON serialization (`kotlinx-serialization-json`) are [experimental](components-stability.md), which means their API can be changed without notice. |
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.
All libraries except JSON serialization (`kotlinx-serialization-json`) are [experimental](components-stability.md), which means their API can be changed without notice. | |
All libraries, except for JSON serialization (`kotlinx-serialization-json`), are [Experimental](components-stability.md). Their APIs might change at any time. |
docs-website/topics/serialization.md
Outdated
## What's next | ||
|
||
* Learn the basics of Kotlin serialization in the [Get started with serialization tutorial](serialization-get-started.md). | ||
* See how the `kotlinx.serialization` library processes [primitives, collections, and other built-in types](serialization-serialize-builtin-types.md) |
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.
* See how the `kotlinx.serialization` library processes [primitives, collections, and other built-in types](serialization-serialize-builtin-types.md) | |
* See how the `kotlinx.serialization` libraries process [primitives, collections, and other built-in types](serialization-serialize-builtin-types.md) |
docs-website/topics/serialization.md
Outdated
|
||
* Learn the basics of Kotlin serialization in the [Get started with serialization tutorial](serialization-get-started.md). | ||
* See how the `kotlinx.serialization` library processes [primitives, collections, and other built-in types](serialization-serialize-builtin-types.md) | ||
* To explore more complex JSON serialization scenarios, see [JSON serialization overview](configure-json-serialization.md). |
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.
* To explore more complex JSON serialization scenarios, see [JSON serialization overview](configure-json-serialization.md). | |
* Explore more complex JSON serialization scenarios in the [JSON serialization overview](configure-json-serialization.md). |
docs-website/topics/serialization.md
Outdated
* Learn the basics of Kotlin serialization in the [Get started with serialization tutorial](serialization-get-started.md). | ||
* See how the `kotlinx.serialization` library processes [primitives, collections, and other built-in types](serialization-serialize-builtin-types.md) | ||
* To explore more complex JSON serialization scenarios, see [JSON serialization overview](configure-json-serialization.md). | ||
* Dive into the [Serialize classes](serialization-customization-options.md) section to learn how to serialize classes and how to modify the default behavior of the `@Serializable` annotation. |
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.
* Dive into the [Serialize classes](serialization-customization-options.md) section to learn how to serialize classes and how to modify the default behavior of the `@Serializable` annotation. | |
* Dive into [Serialize classes](serialization-customization-options.md) to learn how to serialize classes and modify the default behavior of the `@Serializable` annotation. |
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.
Awesome! Just one last suggestion. LGTM! 🚀
docs-website/topics/serialization.md
Outdated
| [JSON](https://www.json.org/json-en.html) | [`kotlinx-serialization-json`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#json) | all supported platforms | Stable | | ||
| [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md) | [`kotlinx-serialization-hocon`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#hocon) | JVM only | Experimental | | ||
| [Protocol Buffers](https://protobuf.dev/) | [`kotlinx-serialization-protobuf`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#protobuf) | all supported platforms | Experimental | | ||
| [CBOR](https://cbor.io/) | [`kotlinx-serialization-cbor`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#cbor) | all supported platforms | Experimental | | ||
| [Properties](https://en.wikipedia.org/wiki/.properties) | [`kotlinx-serialization-properties`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#properties) | all supported platforms | Experimental | |
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.
| [JSON](https://www.json.org/json-en.html) | [`kotlinx-serialization-json`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#json) | all supported platforms | Stable | | |
| [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md) | [`kotlinx-serialization-hocon`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#hocon) | JVM only | Experimental | | |
| [Protocol Buffers](https://protobuf.dev/) | [`kotlinx-serialization-protobuf`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#protobuf) | all supported platforms | Experimental | | |
| [CBOR](https://cbor.io/) | [`kotlinx-serialization-cbor`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#cbor) | all supported platforms | Experimental | | |
| [Properties](https://en.wikipedia.org/wiki/.properties) | [`kotlinx-serialization-properties`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#properties) | all supported platforms | Experimental | | |
| [JSON](https://www.json.org/json-en.html) | [`kotlinx-serialization-json`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#json) | All supported platforms | Stable | | |
| [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md) | [`kotlinx-serialization-hocon`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#hocon) | JVM only | Experimental | | |
| [Protocol Buffers](https://protobuf.dev/) | [`kotlinx-serialization-protobuf`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#protobuf) | All supported platforms | Experimental | | |
| [CBOR](https://cbor.io/) | [`kotlinx-serialization-cbor`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#cbor) | All supported platforms | Experimental | | |
| [Properties](https://en.wikipedia.org/wiki/.properties) | [`kotlinx-serialization-properties`](https://github.com/Kotlin/kotlinx.serialization/blob/master/formats/README.md#properties) | All supported platforms | Experimental | |
This PR is for the first batch of documentation updates for KT-79623 [Docs][Libraries] Serialization introduction