Senparc.Weixin.Helpers.JsonSetting.JsonSetting C# (CSharp) Method

JsonSetting() public method

JSON输出设置 构造函数
public JsonSetting ( bool ignoreNulls = false, List propertiesToIgnore = null, List typesToIgnore = null ) : System
ignoreNulls bool 是否忽略当前类型以及具有IJsonIgnoreNull接口,且为Null值的属性。如果为true,符合此条件的属性将不会出现在Json字符串中
propertiesToIgnore List 需要特殊忽略null值的属性名称
typesToIgnore List 指定类型(Class,非Interface)下的为null属性不生成到Json中
return System
        public JsonSetting(bool ignoreNulls = false, List<string> propertiesToIgnore = null, List<Type> typesToIgnore = null)
        {
            IgnoreNulls = ignoreNulls;
            PropertiesToIgnore = propertiesToIgnore ?? new List<string>();
            TypesToIgnore = typesToIgnore ?? new List<Type>();
        }
    }
JsonSetting