mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Misc
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user