32 lines
696 B
C#
32 lines
696 B
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace MapoSDK
|
|
{
|
|
public class MSDK_utils
|
|
{
|
|
/// <summary>
|
|
/// Deserializza (se possibile) una stringa in una List di EventDetail
|
|
/// </summary>
|
|
/// <param name="rawData"></param>
|
|
/// <returns></returns>
|
|
public static List<EventDetail> deserEvDetString(string rawData)
|
|
{
|
|
List<EventDetail> answ = new List<EventDetail>();
|
|
if (!string.IsNullOrEmpty(rawData))
|
|
{
|
|
try
|
|
{
|
|
answ = JsonConvert.DeserializeObject<List<EventDetail>>(rawData);
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
}
|