gso

How to parse with GSON when identifier has space in name

与世无争的帅哥 提交于 2019-11-26 16:55:41
问题 How to parse with GSON when file looks like this { "Person Id":"test", "Last Name": "test", "First Name":"test" } I know to parse when names doesn't have space between, I create class like class Person{ public String PersonId; public String LastName; public String FirstName; } but how to parse when identifier has space inside ? What to change in Person class ? ( I cannot change format of file ). 回答1: I have tried to parse this JSON but I didn't use GSON to parse this. I'll share my code with