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
The only way I found to make it work is to use the internal API:
@file:Suppress(
"CANNOT_OVERRIDE_INVISIBLE_MEMBER",
"INVISIBLE_MEMBER",
"INVISIBLE_REFERENCE",
)
val data = documentSnaphshot.encodedData()
data asMap<String, Any?>
data.forEach {
if (it.value isString) {
// case 1
} elseif (it.value isMap<*, *>) {
// case 2
} else {
error("expected a string or a map")
}
}
From #500 (comment), I understand, this is currently dangerous because the returned data contains native NativeTimestamp values that have different types in commonMain but could those be updated to always return dev.gitlive.firebase.firestore.Timestamp instead?
The text was updated successfully, but these errors were encountered:
This is a follow up from #500
This also relates to Kotlin/kotlinx.serialization#2223
I also have dynamic content that can be different types:
vs
The only way I found to make it work is to use the internal API:
From #500 (comment), I understand, this is currently dangerous because the returned data contains native
NativeTimestamp
values that have different types incommonMain
but could those be updated to always returndev.gitlive.firebase.firestore.Timestamp
instead?The text was updated successfully, but these errors were encountered: