public static string SerializeObject(object value, Type type, Newtonsoft.Json.Formatting formatting, JsonSerializerSettings settings)
        {
            JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(settings);

            jsonSerializer.Formatting = formatting;
            return(JsonConvert.SerializeObjectInternal(value, type, jsonSerializer));
        }
 public static string SerializeObject(object value, Type type, JsonSerializerSettings settings)
 {
     return(JsonConvert.SerializeObjectInternal(value, type, JsonSerializer.CreateDefault(settings)));
 }