Skip to content

Conversation

@daniCsorbaJB
Copy link

This is the second part of the Kotlin Serialization rewrite.

Related YouTract ticket is: KT-80054 [Docs][Libraries] Get started with Kotlin Serialization)

@daniCsorbaJB daniCsorbaJB changed the title feat: adding the get started page Documentation rewrite - Get started page Aug 11, 2025
Copy link
Member

@sandwwraith sandwwraith left a comment

Choose a reason for hiding this comment

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

.

Copy link
Member

@sandwwraith sandwwraith left a comment

Choose a reason for hiding this comment

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

I've realized we have a tip

We also provide kotlinx-serialization-core artifact that contains all serialization API but does not have a bundled serialization format with it

in our current README.md, which is missing from this document.
Perhaps it is better to place it in the serialization.md/Kotlin serialization libraries or Supported serialization formats section in the form of

Pro tip: if you do not want a dependency on a particular format (e.g., you are writing your own serialization format), you can use kotlinx-serialization-core library.

@daniCsorbaJB
Copy link
Author

I've realized we have a tip

We also provide kotlinx-serialization-core artifact that contains all serialization API but does not have a bundled serialization format with it

in our current README.md, which is missing from this document. Perhaps it is better to place it in the serialization.md/Kotlin serialization libraries or Supported serialization formats section in the form of

Pro tip: if you do not want a dependency on a particular format (e.g., you are writing your own serialization format), you can use kotlinx-serialization-core library.

I really like the second option — let's go with that (let's put it in the supported serialization formats page)

@sandwwraith
Copy link
Member

I really like the second option — let's go with that (let's put it in the supported serialization formats page)

So, do you plan to address it?

Copy link

@sarahhaggarty sarahhaggarty left a comment

Choose a reason for hiding this comment

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

It's looking nice! I have a few suggestions and questions for you.


```kotlin
@Serializable
data class Data(val a: Int, val b: String)

Choose a reason for hiding this comment

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

Could you improve the example by making it more real world like? For example, the data class could be called Book and have title which is a String and yearPublished as an Int.

Copy link
Author

@daniCsorbaJB daniCsorbaJB Nov 10, 2025

Choose a reason for hiding this comment

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

sure thing 👍 — rewrote both examples with those examples.


## What's next
* Learn how to serialize standard types, including built-in types like numbers and strings, in [Serialize built-in types](serialization-serialize-builtin-types.md).

Choose a reason for hiding this comment

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

By "standard" do you mean basic types?

Copy link
Author

Choose a reason for hiding this comment

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

hmm 🤔 yea - but I think we can remove it as a whole to make it more concise:

Copy link
Member

Choose a reason for hiding this comment

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

Collections are not built-in or basic types, they belong to Kotlin standard library. Hence the name "standard types".

## What's next
* Learn how to serialize standard types, including built-in types like numbers and strings, in [Serialize built-in types](serialization-serialize-builtin-types.md).
* Discover how to customize class serialization and adjust the default behavior of the `@Serializable` annotation in the [Serialize classes](serialization-customization-options.md) section.

Choose a reason for hiding this comment

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

Will it be a section in this page? Or is it a page itself?

Copy link
Author

Choose a reason for hiding this comment

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

no the page itself so I rewrite it like:

  • Discover how to customize class serialization and adjust the default behavior of the @Serializable annotation in Serialize classes.

// Data(a=42, b=str)
}
```
{kotlin-runnable="true"}

Choose a reason for hiding this comment

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

It would also be great to have an ID here.

Copy link
Author

Choose a reason for hiding this comment

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

added one here as well — good idea! 🙏

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.

5 participants