Giter VIP home page Giter VIP logo

parcelgen's People

Contributors

alanhamlett avatar coltin avatar cortinico avatar docdoc avatar dwaxemberg avatar greggiacovelli avatar hackyon avatar hdezninirola avatar jbrick avatar macisamuele avatar maltzj avatar markov avatar matthewtpage avatar nbikhcha avatar podarsmarty avatar posuyan avatar pretz avatar pumpkinjnn avatar raducom avatar redwarp avatar rsarvaria avatar tmelz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parcelgen's Issues

Support transience

Tracking here, add support for marking fields as transient in the generated java class. I'm already done with these (easy) changes.

"transient": [
    currentLocation,
    statusUpdate
]

Delete space character

Looks like we're always getting an extra space character when overriding equals()

if (object == this ) {
return true;
}

enum should be in their own files

I think enums, being specific class, should be also defined in a specific json file, with of format like

{
    "do_json": true,
    "package": "com.yelp.android.biz.serializable",
    "type": "enum",
    "values": [
        "VALUE_1",
        "VALUE_2",
        ...
    ]
}

The fact that they are currently generated inside another class makes it impossible to reuse them among parcel generated classes.

Define default values

Right now I believe the parser will default to defaulting to 0 when parsing nonexistent keys with optInt and optLong; it would be better if long and int parsing defaulted to -1. Double parsing already correctly defaults to NaN.

However, the best option would be if the fallback value were definable in the json.

Generate equals method

Should create equals method. This will allow subclasses of generated classes to not need to recreate the equals method.

Remove imports.add(com.yelp.android.BuildConfig)

Remove imports.add(com.yelp.android.BuildConfig) on line 234, this is a hardcoded import that will cause issues if the script is being used with another package. We need it just to log out some stuff if in debug mode, we can get rid of those lines for now.

Gradle build instructions?

Most libraries like this are now not used statically but included in build.gradle. Can this one be done that way?

Support for Enums

Providing support for Enum values (we'll need a way to define all the possible values, too).

Should include both Parcelable and JSON support.

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.