about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
diff options
context:
space:
mode:
authorEmma@Rory& <root@rory.gay>2023-08-14 05:07:51 +0200
committerEmma@Rory& <root@rory.gay>2023-08-14 05:11:21 +0200
commitaa7026a17ededf7c181ed269c6388491d96e1b1e (patch)
tree963b45cebbfefb3c5cebaf4ba7134a0e32eb0147 /MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
parentAdd latest code before splitting projects (diff)
downloadMatrixUtils-aa7026a17ededf7c181ed269c6388491d96e1b1e.tar.xz
Split LibMatrix into submodule
Diffstat (limited to 'MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs')
-rw-r--r--MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs16
1 files changed, 0 insertions, 16 deletions
diff --git a/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs b/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
deleted file mode 100644
index a4b0791..0000000
--- a/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Text.Encodings.Web;
-using System.Text.Json;
-using MatrixRoomUtils.Core.Interfaces;
-using MatrixRoomUtils.Core.Responses;
-
-namespace MatrixRoomUtils.Core.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);
-    }
-}
\ No newline at end of file