-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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user