Closed RobinJayaswal closed 7 years ago
Fixed, . The problem was with gson.fromJson(json, Access.class)
.
The json string has property names that are lower case with underscores, and gson looks for exact matches to the constructor parameters, which are camel case. You just have to configure gson to expect this capitalization:
private final Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
Pr #10 fixes.
This prints out