ethanlozano.github.io's People
ethanlozano.github.io's Issues
Follow up question for your firestore kotlin sdk ticket
Hi,
My name is Yaowen Mei ([email protected]), I am doing an internship at firestore SDK team, and my project is to implement firestore kotlin SDK serialization.
I saw your ticket: firebase/firebase-android-sdk#2916
Thank you very much for your suggestion, and I am just wandering, could you please explain more about your first 2 comments for the limitation section please?
1) Kotlin and Java Bean interfaces do not work too well together. Specifically, Kotlin automatically generates getters and setters. However, if the data class implements an interface, then the "override" keyword apparently generates conflicting getters that breaks POJO serialization.
2) Does not handle generics, or at least it's unclear how to handle generics.
What I have tried:
- use the current sdk, I created a interface, and concrete class implemented the interface, and I tried to de-serialize the class object from firestore with:
interface Human {
val name: String?
}
class NewStudent:Human {
override val name: String?
get() = "child_name"
}
docRef.get().addOnSuccessListener { documentSnapshot ->
val student = documentSnapshot.toObject(NewStudent::class.java)
Log.v("TEST", student!!.name.toString())
}
I didn't have any break issue.
- I want to duplicate the handle generics limitation issue as well, but I want to double check with you that what you really mean by handle generics?
Thank you very much for your help~
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.