revert Newtonsoft.Json

This commit is contained in:
Gang Zhuo
2015-10-10 03:34:27 -04:00
parent c532cce99d
commit 8a6249c4a3
4 changed files with 11 additions and 4 deletions
@@ -6,6 +6,7 @@ using System.Reflection;
using Shadowsocks.Controller;
using Shadowsocks.Controller.Strategy;
using SimpleJson;
using Newtonsoft.Json;
namespace Shadowsocks.Model
{
@@ -28,10 +29,10 @@ namespace Shadowsocks.Model
try
{
var content = File.ReadAllText(ConfigFile);
var configuration = SimpleJson.SimpleJson.DeserializeObject<StatisticsStrategyConfiguration>(content);
var configuration = JsonConvert.DeserializeObject<StatisticsStrategyConfiguration>(content);
return configuration;
}
catch (FileNotFoundException)
catch (FileNotFoundException e)
{
var configuration = new StatisticsStrategyConfiguration();
Save(configuration);
@@ -48,7 +49,7 @@ namespace Shadowsocks.Model
{
try
{
var content = SimpleJson.SimpleJson.SerializeObject(configuration);
var content = JsonConvert.SerializeObject(configuration, Formatting.Indented);
File.WriteAllText(ConfigFile, content);
}
catch (Exception e)