about summary refs log tree commit diff
path: root/LibMatrix/Extensions/ObjectExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/Extensions/ObjectExtensions.cs')
-rw-r--r--LibMatrix/Extensions/ObjectExtensions.cs14
1 files changed, 0 insertions, 14 deletions
diff --git a/LibMatrix/Extensions/ObjectExtensions.cs b/LibMatrix/Extensions/ObjectExtensions.cs
deleted file mode 100644
index 085de7d..0000000
--- a/LibMatrix/Extensions/ObjectExtensions.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Text.Encodings.Web;
-using System.Text.Json;
-
-namespace LibMatrix.Extensions;
-
-public static class ObjectExtensions {
-    public static string ToJson(this object obj, bool indent = true, bool ignoreNull = false, bool unsafeContent = false) {
-        var jso = new JsonSerializerOptions();
-        if (indent) jso.WriteIndented = true;
-        if (ignoreNull) jso.IgnoreNullValues = true;
-        if (unsafeContent) jso.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;
-        return JsonSerializer.Serialize(obj, jso);
-    }
-}