mirror of
https://github.com/farcasclaudiu/myfriendsaround.git
synced 2026-06-29 15:01:45 +03:00
Added tag tag1 for changeset 4c285537b335
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MyFriendsAround.WP7.Utils
|
||||
{
|
||||
public static class SerializationHelper
|
||||
{
|
||||
public static T Deserialize<T>(string serialized)
|
||||
{
|
||||
if (string.IsNullOrEmpty(serialized))
|
||||
return default(T);
|
||||
|
||||
return JsonConvert.DeserializeObject<T>(serialized);
|
||||
}
|
||||
|
||||
public static string Serialize<T>(T obj)
|
||||
{
|
||||
return JsonConvert.SerializeObject(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user