public void SerializeNullableEnumWithNoValue() { var obj = new SerializeNullableEnumClass(); var json = SimpleJson.SerializeObject(obj); Assert.AreEqual("{\"Value\":null}", json); }
public void SerializeNullableEnumWithValue() { var obj = new SerializeNullableEnumClass { Value = Values.Two }; var json = SimpleJson.SerializeObject(obj); Assert.AreEqual("{\"Value\":\"Two\"}", json); }