Gson serialization error class com.activeandroid.DatabaseHelper declares multiple JSON fields named mContext

Error im get is "java.lang.IllegalArgumentException: class com.activeandroid.DatabaseHelper declares multiple JSON fields named mContext"

I am using AndroidAnnotations RestClient to retrieve data from my web service and serialize to POJO. Serialization worked fine when using ORMLite, but I recently decided to try Active Android, and now my classes extend the model. Gson serializes a parent class that I do not control. In any case, I can only include certain fields, or maybe just return normal JSON from RestClient and do the serialization in a different way

@Rest(rootUrl = "http://stuff...com", converters = { GsonHttpMessageConverter.class })
    public interface RestClient {
    @Get("/AndroidController/createFacebookUser?facebookToken={facebookToken}&catIds=    {catIds}")
    User createFacebookUser(String facebookToken,String catIds);
}

and user model

@Data
@Table(name = "Users")
public class User extends Model {
@Column(name = "SystemID")
private String systemID;
@Column(name = "Name")
private String name;
public List<GameEntry> items() {
    return getMany(GameEntry.class, "Category");
}

public User(){}

}

+5
2

Gson . , , @Expose ExclusionStrategy.

+6

, AbstractHttpMessageConverter

HttpMessageConverter @ResponseBody, Json

, , , Gson @Expose , ,

private Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
+3

All Articles