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

Get Android High Performance Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.