For the More Curious: Alternate Parsers and Data Formats

Gson is a popular parser for JSON, but it is not the only one you can use. Moshi (github.com/​square/​moshi) is another popular library from Square that also handles parsing JSON data. Moshi borrows some ideas from Gson and attempts to make them faster and more efficient. Square created a converter for Moshi so that it can work directly with Retrofit.

Retrofit does not limit you to just using JSON as your data format. You can also use XML or even Protobufs, if you want. There are many serialization libraries available for Retrofit, so you can use the one that best fits your data transfer configuration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.197.198