我经常遇到关于Java Date和其他与日期时间相关的类的负面反馈.作为一名.NET开发人员,我不能完全(没有使用它们)了解它们实际上有什么问题.
任何人都可以对此有所了解吗?
由于错误,我无法在房间内创建typeConverter.我似乎每个文档都遵循一切.我想将列表转换为json字符串.让我们来看看我的实体:
@Entity(tableName = TABLE_NAME)
public class CountryModel {
public static final String TABLE_NAME = "Countries";
@PrimaryKey
private int idCountry;
/* I WANT TO CONVERT THIS LIST TO A JSON STRING */
private List<CountryLang> countryLang = null;
public int getIdCountry() {
return idCountry;
}
public void setIdCountry(int idCountry) {
this.idCountry = idCountry;
}
public String getIsoCode() {
return isoCode;
}
public void setIsoCode(String isoCode) {
this.isoCode = isoCode;
}
public List<CountryLang> getCountryLang() {
return countryLang;
}
public void setCountryLang(List<CountryLang> countryLang) { …Run Code Online (Sandbox Code Playgroud)