How can I pass an instance of a object by value?
I have two model class. One class I have defined PreferenceModel as a property. PreferenceModel contains one property called showData which is a bool. Now my json is printing: preference: Instance of ‘PreferenceModel’ I want it to print preference: { showData:true } >Solution : You have create a method toJson in your parent and child… Read More How can I pass an instance of a object by value?