got legacy tree icons showing up now, added a couple of filters for this to work.

This commit is contained in:
Shannon Deminick
2013-06-02 17:09:16 -10:00
parent c60cc5d10d
commit 575b5b71ab
9 changed files with 120 additions and 41 deletions

View File

@@ -4,33 +4,6 @@ using Newtonsoft.Json.Linq;
namespace Umbraco.Core.Serialization
{
/// <summary>
/// This is used in order to deserialize a json object on a property into a json string since the property's type is 'string'
/// </summary>
internal class JsonToStringConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
throw new NotImplementedException();
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.ValueType == typeof(string))
{
return reader.Value;
}
// Load JObject from stream
JObject jObject = JObject.Load(reader);
return jObject.ToString();
}
public override bool CanConvert(Type objectType)
{
return typeof(string).IsAssignableFrom(objectType);
}
}
internal abstract class JsonCreationConverter<T> : JsonConverter
{
/// <summary>