You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JsonObject
abstract class SearchResult<T> {
@JsonField
var total: Int = 0
@JsonField
var count: Int = 0
@JsonField
var limit: Int = 0
@JsonField
var offset: Int = 0
@JsonField
var items: List<T>? = null
}
@JsonObject
class CategorySearchResult : SearchResult<Category>()
In compilation I receive the error 'Error:@JsonField annotation can only be used on private fields if both getter and setter are present.'. When I comment @JsonField at List, the error disappeared. How can I avoid the problem?
The text was updated successfully, but these errors were encountered:
I have a model structure like with:
In compilation I receive the error 'Error:@JsonField annotation can only be used on private fields if both getter and setter are present.'. When I comment @JsonField at List, the error disappeared. How can I avoid the problem?
The text was updated successfully, but these errors were encountered: