22 lines
560 B
C#
22 lines
560 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace GuruClient
|
|
{
|
|
public static partial class Utility
|
|
{
|
|
public static partial class Json
|
|
{
|
|
public static string Serialize(object value)
|
|
{
|
|
string jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(value);
|
|
return jsonData;
|
|
}
|
|
|
|
public static T Deserialize<T>(string value)
|
|
{
|
|
T obj = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(value);
|
|
return obj;
|
|
}
|
|
}
|
|
}
|
|
} |