Giter VIP home page Giter VIP logo

ethanlozano.github.io's People

Contributors

ethanlozano avatar

Watchers

 avatar  avatar

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:

  1. 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.

  1. 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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.