I
I
Igor2014-06-02 12:29:00
Java
Igor, 2014-06-02 12:29:00

Why does GSON for all fields of an object get values, but for the sid field is always null?

Why does GSON for all fields of an object get values, but for the sid field is always null?

public class Info implements Serializable {
 private int id;
 private String company_name; 
 private String company_url; 
 private String contact_city;
 private int scope;
 private String sid;
}

info: {
 id: "8",
 company_name: "Вкусные подарки",
 company_url: "google.ru",
 contact_city: "",
 scope: 0,
 sid: "hfgjixbl"
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2014-06-03
@silverhawk90

Judging by your example, sid gets the value "hfgjixbl", where did you see null? Write your complete code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question