Serializing null values

Report a typo

Given the following class definition, which fields will be present in the JSON resulting from Gson's default serialization of a Person object?

class Person {
  String name = "Sophocles";
  int age = 93;
  String country = null;
  String occupation = null;
}
Select one or more options from the list
___

Create a free account to access the full topic