How to parse with GSON when identifier has space in name

While still using GSON you can do this by adding an annotation. For instance:

class Person{
    @SerializedName("Person Id") public String PersonId;
    @SerializedName("Last Name") public String LastName;
    @SerializedName("First Name") public String FirstName;
}

You can find more details in the GSON documentation:
https://sites.google.com/site/gson/gson-user-guide#TOC-JSON-Field-Naming-Support

Leave a Comment