-Fix issue when deserializing string to byte data

-Fix converting a JValue to a compatible type
-Allow JsonConverterAttribute to be added to interfaces/structs/enums
This commit is contained in:
JamesNK
2010-06-11 13:11:44 +00:00
parent f5ed7be283
commit 4a1c8d3a80
5 changed files with 50 additions and 3 deletions
@@ -190,5 +190,12 @@ namespace Newtonsoft.Json.Tests.Linq
JValue v = new JValue((object)null);
int i = (int) v;
}
[Test]
public void ConvertValueToCompatibleType()
{
IComparable c = (new JValue(1).Value<IComparable>());
Assert.AreEqual(1, c);
}
}
}