This commit is contained in:
Archi
2024-02-23 01:18:09 +01:00
parent 0c848ec366
commit 33a1fdf556

View File

@@ -42,10 +42,10 @@ public static class JsonUtilities {
public static readonly JsonSerializerOptions IndentedJsonSerialierOptions = CreateDefaultJsonSerializerOptions(true);
[PublicAPI]
public static JsonElement ToJsonElement<T>(this T obj, bool writeIndented = false) where T : notnull {
public static JsonElement ToJsonElement<T>(this T obj) where T : notnull {
ArgumentNullException.ThrowIfNull(obj);
return JsonSerializer.SerializeToElement(obj, writeIndented ? IndentedJsonSerialierOptions : DefaultJsonSerialierOptions);
return JsonSerializer.SerializeToElement(obj, DefaultJsonSerialierOptions);
}
[PublicAPI]