Git Product home page Git Product logo

Comments (5)

johncarl81 avatar johncarl81 commented on August 10, 2024

The good news is that the type information is available during the compilation phase when Parceler runs (it's also available during runtime to some degree: http://stackoverflow.com/questions/9548779/java-generics-accessing-generic-type-at-runtime). I think adding collection support is a good idea. I would guess Parceler would just serialize from the given collection to an array and then back again. Maybe we could specify the specific collection type to use.

from parceler.

mdumrauf avatar mdumrauf commented on August 10, 2024

Yeah, I think that is the way to go. A Parcel supports methods to read/write List, Array, Map and SparseArray. All of them end using writeValue(Object) which checks their type using a rudimentary instanceof. So maybe we can work it out with a similar approach.

I can work on it in a couple of weeks when I finish my exams.

from parceler.

johncarl81 avatar johncarl81 commented on August 10, 2024

@mdumrauf I added the List and Map types (including ArrayList and HashMap) to Parceler under commit 19e946c which worked out nicely and prompted a much needed refactoring. Let me know what you think, thanks!

from parceler.

mdumrauf avatar mdumrauf commented on August 10, 2024

I'll have a look at it and let you know! :)

from parceler.

johncarl81 avatar johncarl81 commented on August 10, 2024

Im going to close this issue, but feel free to ping me if you have any comments. Thanks!

from parceler.

Related Issues (20)

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.