Gson Deserialization with Kotlin, Initializer block not called
Gson is intended for usage with pure Java and doesn’t interpret Kotlin primary constructors properly. If there is a default no-argument constructor, it is called (in your case, there is one: the primary constructor with default value “” for someString), otherwise Gson calls no constructor at all. Then Gson sets the property values (also, it … Read more