init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Converter
|
||||
{
|
||||
public static class CustomJsonConverter
|
||||
{
|
||||
public static T DeserializeJsonToObject<T>(string json) where T : class, new()
|
||||
=> !string.IsNullOrWhiteSpace(json) ? JsonConvert.DeserializeObject<T>(json) : null;
|
||||
|
||||
public static string SerializeObjectToJson(object myObject)
|
||||
=> (myObject != null) ? JsonConvert.SerializeObject(myObject) : string.Empty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user