Skip to content

Commit

Permalink
Update Annotations.kt, fixed typo: RgpPixel -> RgbPixel (#2793)
Browse files Browse the repository at this point in the history
It was RgpPixel but it should be RgbPixel as the class with this name was declared before:
`class RgbPixel(val red: Short, val green: Short, val blue: Short)`
  • Loading branch information
asnov authored Aug 26, 2024
1 parent d344086 commit e4fa8a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/commonMain/src/kotlinx/serialization/Annotations.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import kotlin.reflect.*
*
* @Serializable
* class RgbExample(
* @Serializable(with = RgbAsHexString::class) p1: RgpPixel, // Serialize as HEX string, e.g. #FFFF00
* @Serializable(with = RgbAsSingleInt::class) p2: RgpPixel, // Serialize as single integer, e.g. 16711680
* p3: RgpPixel // Serialize as 3 short components, e.g. { "red": 255, "green": 255, "blue": 0 }
* @Serializable(with = RgbAsHexString::class) p1: RgbPixel, // Serialize as HEX string, e.g. #FFFF00
* @Serializable(with = RgbAsSingleInt::class) p2: RgbPixel, // Serialize as single integer, e.g. 16711680
* p3: RgbPixel // Serialize as 3 short components, e.g. { "red": 255, "green": 255, "blue": 0 }
* )
* ```
* In this example, each pixel will be serialized using different data representation.
Expand Down

0 comments on commit e4fa8a3

Please sign in to comment.