-
Notifications
You must be signed in to change notification settings - Fork 664
Documentation rewrite - Get started page #3059
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
base: doc-restructuring-master
Are you sure you want to change the base?
Conversation
sandwwraith
left a comment
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.
.
sandwwraith
left a comment
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'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-corelibrary.
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? |
sarahhaggarty
left a comment
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's looking nice! I have a few suggestions and questions for you.
|
|
||
| ```kotlin | ||
| @Serializable | ||
| data class Data(val a: Int, val b: String) |
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.
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.
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.
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). |
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.
By "standard" do you mean basic types?
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.
hmm 🤔 yea - but I think we can remove it as a whole to make it more concise:
- Learn how to serialize built-in types like numbers and strings, in Serialize built-in types.
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.
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. |
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.
Will it be a section in this page? Or is it a page itself?
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.
no the page itself so I rewrite it like:
- Discover how to customize class serialization and adjust the default behavior of the
@Serializableannotation in Serialize classes.
| // Data(a=42, b=str) | ||
| } | ||
| ``` | ||
| {kotlin-runnable="true"} |
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 would also be great to have an ID here.
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.
added one here as well — good idea! 🙏
This is the second part of the Kotlin Serialization rewrite.
Related YouTract ticket is: KT-80054 [Docs][Libraries] Get started with Kotlin Serialization)