internal static bool TestCase() { NoConstructorSon value = new NoConstructorSon { Value = 1 }; string json = AutoCSer.JsonSerializer.Serialize(value); AutoCSer.Json.DeSerializeConfig parseConfig = new AutoCSer.Json.DeSerializeConfig { Constructor = checkConstructor }; NoConstructor newValue = AutoCSer.JsonDeSerializer.DeSerialize <NoConstructor>(json, parseConfig); return(newValue != null && newValue.Value == 1); }
internal static bool TestCase() { NoConstructorSon value = new NoConstructorSon { Value = 1 }; string xml = AutoCSer.Xml.Serializer.Serialize(value); AutoCSer.Xml.ParseConfig parseConfig = new AutoCSer.Xml.ParseConfig { Constructor = checkConstructor }; NoConstructor newValue = AutoCSer.Xml.Parser.Parse <NoConstructor>(xml, parseConfig); return(newValue != null && newValue.Value == 1); }