Use JsonSerializer instead of Utf8Writer (#1670)

* Use JsonSerializer instead of Utf8Writer

* Rename method
This commit is contained in:
stefansjfw
2020-03-25 11:11:18 +01:00
committed by GitHub
parent 7f1a854769
commit 8156279025
6 changed files with 246 additions and 143 deletions

View File

@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json;
using FancyZonesEditor.Utils;
namespace FancyZonesEditor
{
public class DashCaseNamingPolicy : JsonNamingPolicy
{
public static DashCaseNamingPolicy Instance { get; } = new DashCaseNamingPolicy();
public override string ConvertName(string name)
{
return name.UpperCamelCaseToDashCase();
}
}
}