java - When to use GSON to parse object? -


i trying pass array list of objects 1 activity another. have seen people use gson library serialize objects, , have seen people make object implement parceable interface, or serializable interface. curious technical difference/advantages of using 1 on other is.

please note, not meant opinion-based question, more of technical inquiry.

thanks in advance.

parcelable android-specific recommended way data 1 activity another. see how pass data between activities in android application? specifics of how passing.

now if implementing cross-platform application, or if needed send same model web service, might beneficial use json serialization format. serializable used if cross-platform jvm languages. said implement both interfaces , use best method each application. json on network , parcels between activities.

in general when choosing serialization method, should consider qualities you're looking for. qualities like:

  • maintainability
  • network size
  • serialization/deserialization performance
  • ease of implementation
  • human readability

pick whichever serialization format best use cases, , implement many need cover of use cases.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -