O'Reilly logo

Android High Performance Programming by Diego Grancini, Enrique López Mañas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serialization

The same considerations related to lowering image sizes to speed up transfers can be used for text files as well. So, let's have a quick overview of a typical format to transfer data over our client/server architecture. Until a couple of years ago, the XML format was the most used. Then developers changed it to JSON format. Both are human readable, but JSON is simpler to write because of its syntax. It has no need for tags and attributes. For these reasons, JSON is lighter and more preferred and used than XML.

JSON improvements

Google provide an easy-to-use library to handle JSON serialization and deserialization, called GSON. In principle, it uses reflection to find the getters and setters of a Java bean; then, if everything is in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required