using BTCPayServer.Abstractions.Form; using BTCPayServer.Data.Data; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace BTCPayServer.Forms; public static class FormDataExtensions { public static void AddForms(this IServiceCollection serviceCollection) { serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); } public static JObject Deserialize(this FormData form) { return JsonConvert.DeserializeObject(form.Config); } public static string Serialize(this JObject form) { return JsonConvert.SerializeObject(form); } }