Skip to content

Commit 932f8c5

Browse files
committed
Merge branch 'master' into dev
2 parents 549b9cc + 55c4c20 commit 932f8c5

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

docs/basic-serialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fun main() {
182182

183183
> You can get the full code [here](../guide/example/example-classes-01.kt).
184184
185-
We can clearly see that only `owner` and `stars` properties are present in the JSON output.
185+
We can clearly see that only `name` and `stars` properties are present in the JSON output.
186186

187187
```text
188188
{"name":"kotlinx.serialization","stars":9000}
@@ -409,7 +409,7 @@ fun main() {
409409

410410
> You can get the full code [here](../guide/example/example-classes-08.kt).
411411
412-
Attempt to explicitly specify its value in the serial format, even if the specified
412+
Attempts to explicitly specify its value in the serial format, even if the specified
413413
value is equal to the default one, produces the following exception.
414414

415415
```text

docs/json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ unstructured data that it does not readily fit into the typesafe world of Kotlin
335335

336336
### Parsing to Json element
337337

338-
A string can _parsed_ into an instance of [JsonElement] with the [Json.parseToJsonElement] function.
338+
A string can be _parsed_ into an instance of [JsonElement] with the [Json.parseToJsonElement] function.
339339
It is called neither decoding nor deserialization, because none of that happens in the process.
340340
Only JSON parser is being used here.
341341

docs/polymorphism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ the [Sealed classes](#sealed-classes) section, but here subclasses can be spread
326326

327327
We can update the previous example and turn `Project` superclass into an interface. However, we cannot
328328
mark an interface itself as `@Serializable`. No problem. Interfaces cannot have instances by themselves.
329-
Interfaces can only be represented by instances of their derived classes. Interfaces are used in the Kolin language to enable polymorphism,
329+
Interfaces can only be represented by instances of their derived classes. Interfaces are used in the Kotlin language to enable polymorphism,
330330
so all interfaces are considered to be implicitly serializable with the [PolymorphicSerializer]
331331
strategy. We just need to mark thier implementing classes as `@Serializable` and register them.
332332

docs/serializers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ element using [decodeIntElement][CompositeDecoder.decodeIntElement] in our examp
502502
var r = -1
503503
var g = -1
504504
var b = -1
505-
while(true) {
505+
while (true) {
506506
when (val index = decodeElementIndex(descriptor)) {
507507
0 -> r = decodeIntElement(descriptor, 0)
508508
1 -> g = decodeIntElement(descriptor, 1)
@@ -580,7 +580,7 @@ object ColorAsObjectSerializer : KSerializer<Color> {
580580
r = decodeIntElement(descriptor, 0)
581581
g = decodeIntElement(descriptor, 1)
582582
b = decodeIntElement(descriptor, 2)
583-
} else while(true) {
583+
} else while (true) {
584584
when (val index = decodeElementIndex(descriptor)) {
585585
0 -> r = decodeIntElement(descriptor, 0)
586586
1 -> g = decodeIntElement(descriptor, 1)

formats/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,11 @@ not be available in other formats such as JSON.
7676
* Platform: JVM only
7777

7878
Allows serialization and deserialization of objects to and from [YAML](http://yaml.org).
79+
80+
### CBOR
81+
82+
* GitHub repo: [L-Briand/obor](https://github.com/L-Briand/obor)
83+
* Artifact ID: `net.orandja.obor:obor`
84+
* Platform: JVM, Android
85+
86+
Allow serialization and deserialization of objects to and from [CBOR](https://cbor.io/). This codec can be used to read and write from Java InputStream and OutputStream.

guide/example/example-serializer-11.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object ColorAsObjectSerializer : KSerializer<Color> {
2727
var r = -1
2828
var g = -1
2929
var b = -1
30-
while(true) {
30+
while (true) {
3131
when (val index = decodeElementIndex(descriptor)) {
3232
0 -> r = decodeIntElement(descriptor, 0)
3333
1 -> g = decodeIntElement(descriptor, 1)

guide/example/example-serializer-12.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object ColorAsObjectSerializer : KSerializer<Color> {
3131
r = decodeIntElement(descriptor, 0)
3232
g = decodeIntElement(descriptor, 1)
3333
b = decodeIntElement(descriptor, 2)
34-
} else while(true) {
34+
} else while (true) {
3535
when (val index = decodeElementIndex(descriptor)) {
3636
0 -> r = decodeIntElement(descriptor, 0)
3737
1 -> g = decodeIntElement(descriptor, 1)

0 commit comments

Comments
 (0)