Gson's @SerializedName annotation is used when:

  1. The JSON is an array
  2. Encrypting data
  3. The field is a number
  4. The JSON field name differs from the Kotlin property name
Answer

D) The JSON field name differs from the Kotlin property name

It maps differently named JSON keys to properties.

Computer Science MCQ · More Maps and Consuming Web Services over HTTP MCQs · Practise