You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated to Kotlin 1.4.10, Coroutines 1.3.9, Serialization 1.0.0 (#88)
* Updated to Kotlin 1.4.10, Coroutines 1.3.9, Serialization 1.0.0-RC
* Only install carthage when not installed already
* Fixing build warnings, and removed cocoapod plugin
* Reverting androidTest change
* Updating serialization to 1.0.0-RC2
* Making an attempt to test nullability
* Updating serialization to 1.0.0
* update readme, closes#89
* make old @ImplicitReflectionSerializer functions inline fun <reified T>
* make old @ImplicitReflectionSerializer functions inline fun <reified T>
* get android instrumented tests running in common module
* Update package.json
* Update package.json
* Update package.json
* Update package.json
* Update package.json
Co-authored-by: Nicholas Bransby-Williams <nbransby@gmail.com>
Asynchronousstreams of values are represented by Flows in the SDK instead of repeatedly invoked callbacks or listeners, for example:
48
+
Asynchronousstreams of values are represented by Flows in the SDK instead of repeatedly invoked callbacks or listeners, for example:
49
49
50
50
```kotlin
51
51
val snapshots:Flow<DocumentSnapshot>
@@ -64,7 +64,7 @@ The Firebase Kotlin SDK uses Kotlin serialization to read and write custom class
64
64
```groovy
65
65
plugins {
66
66
kotlin("multiplatform") // or kotlin("jvm") or any other kotlin plugin
67
-
kotlin("plugin.serialization") version "1.3.72"
67
+
kotlin("plugin.serialization") version "1.4.10"
68
68
}
69
69
```
70
70
@@ -75,15 +75,15 @@ Then mark you custom classes `@Serializable`:
75
75
data classCity(valname:String)
76
76
```
77
77
78
-
Instances of these classes can now be passed [along with their serializer](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/runtime_usage.md#obtaining-serializers) to the SDK:
78
+
Instances of these classes can now be passed [along with their serializer](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#introduction-to-serializers) to the SDK:
79
79
80
80
```kotlin
81
81
db.collection("cities").document("LA").set(City.serializer(), city, encodeDefaults =true)
82
82
```
83
83
84
84
The `encodeDefaults` parameter is optional and defaults to `true`, set this to false to omit writing optional properties if they are equal to theirs default values.
85
85
86
-
You can also omit the serializer for classes that does not have generic type arguments, these functions are marked [`@ImplicitReflectionSerializer`](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/runtime_usage.md#implicit-reflection-serializers) and their usage is discouraged in general because it is implicit and uses reflection (and therefore not working on Kotlin/Native), but may be useful shorthand in some cases.
86
+
You can also omit the serializer but this is discouraged due to a [current limitation on Kotlin/JS and Kotlin/Native](https://github.com/Kotlin/kotlinx.serialization/issues/1116#issuecomment-704342452)
0 commit comments