LaVOZs

The World’s Largest Online Community for Developers

'; Variable set not working duration parsing json via gson in kotlin - LavOzs.Com

I have this variable gEng, but when parsing json, the set function doesn't work

class Gender : BaseLanguageModel()
{
        var gEng: String? = null
        set(value)
        {
            field = value
            en = value
        }
}

P.S : en - BaseLanguageModel class field

Related
JSON parsing using Gson for Java
Google Gson - deserialize list<class> object? (generic type)
Using Enums while parsing JSON with GSON
Gson - convert from Json to a typed ArrayList<T>
Json parsing with gson not working
Representing null in JSON
Parsing JSON with GSON is not working. Variables are empty
How to parse JSON in Kotlin?
Using Gson in Kotlin to parse JSON array
Gson - How to parse partial json in Kotlin