about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-13 20:25:05 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-13 20:25:05 +0200
commit712ad189c99570f686ab779782b2a873e172428e (patch)
tree6102e4719416e71522e9143fa4e06951258bd77c /MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs
parentFix passwords being visible during editing (diff)
downloadMatrixUtils-712ad189c99570f686ab779782b2a873e172428e.tar.xz
Change syntax style
Diffstat (limited to 'MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs')
-rw-r--r--MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs b/MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs
index 725c832..b007136 100644
--- a/MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs
+++ b/MatrixRoomUtils.Core/Extensions/JsonElementExtensions.cs
@@ -5,18 +5,16 @@ using System.Text.Json.Serialization;
 
 namespace MatrixRoomUtils.Core.Extensions;
 
-public static class JsonElementExtensions
-{
-    public static void FindExtraJsonFields([DisallowNull] this JsonElement? res, Type t)
-    {
+public static class JsonElementExtensions {
+    public static void FindExtraJsonFields([DisallowNull] this JsonElement? res, Type t) {
         var props = t.GetProperties();
         var unknownPropertyFound = false;
-        foreach (var field in res.Value.EnumerateObject())
-        {
+        foreach (var field in res.Value.EnumerateObject()) {
             if (props.Any(x => x.GetCustomAttribute<JsonPropertyNameAttribute>()?.Name == field.Name)) continue;
             Console.WriteLine($"[!!] Unknown property {field.Name} in {t.Name}!");
             unknownPropertyFound = true;
         }
-        if(unknownPropertyFound) Console.WriteLine(res.Value.ToJson());
+
+        if (unknownPropertyFound) Console.WriteLine(res.Value.ToJson());
     }
 }
\ No newline at end of file