about summary refs log tree commit diff
path: root/LibMatrix/Extensions/ObjectExtensions.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:16:40 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:16:40 +0200
commit1d02d9d76d987b69ed08a252a3fa66f7d05a4cbc (patch)
tree27314b621fa27045dcb375da9df9fde374d3c69d /LibMatrix/Extensions/ObjectExtensions.cs
parentCode cleanup (diff)
downloadLibMatrix-1d02d9d76d987b69ed08a252a3fa66f7d05a4cbc.tar.xz
Clean up some extension functions
Diffstat (limited to '')
-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);
-    }
-}