JsonMapper not working for singleton class
unrealTOM opened this issue · 0 comments
unrealTOM commented
JsonMapper not working in certain cases: considering the following example code.
public class SingletonTest
{
public bool[] DisableWeather = { true, false, false, false };
static SingletonTest _instance = null;
public static SingletonTest Instance
{
get
{
if (_instance == null)
{
_instance = new SingletonTest();
}
return _instance;
}
}
}
string json = JsonMapper.ToJson(SingletonTest.Instance);