Merge branch 'master' of https://github.com/JamesNK/Newtonsoft.Json
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- [Homepage](http://www.newtonsoft.com/json)
|
- [Homepage](http://www.newtonsoft.com/json)
|
||||||
- [Documentation](http://www.newtonsoft.com/json/help)
|
- [Documentation](http://www.newtonsoft.com/json/help)
|
||||||
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
|
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
|
||||||
|
- [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
|
||||||
- [Contributing Guidelines](CONTRIBUTING.md)
|
- [Contributing Guidelines](CONTRIBUTING.md)
|
||||||
- [License](LICENSE.md)
|
- [License](LICENSE.md)
|
||||||
- [Stack Overflow](http://stackoverflow.com/questions/tagged/json.net)
|
- [Stack Overflow](http://stackoverflow.com/questions/tagged/json.net)
|
||||||
@@ -252,7 +252,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
|||||||
[Test]
|
[Test]
|
||||||
public void DeserializeBasicUnion_MismatchedFieldCount()
|
public void DeserializeBasicUnion_MismatchedFieldCount()
|
||||||
{
|
{
|
||||||
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<Currency>(@"{""Case"":""AUD"",""Fields"":[1]}"), "The number of field values does not match the number of properties definied by union 'AUD'. Path '', line 1, position 27.");
|
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<Currency>(@"{""Case"":""AUD"",""Fields"":[1]}"), "The number of field values does not match the number of properties defined by union 'AUD'. Path '', line 1, position 27.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace Newtonsoft.Json.Converters
|
|||||||
{
|
{
|
||||||
if (caseInfo.Fields.Length != fields.Count)
|
if (caseInfo.Fields.Length != fields.Count)
|
||||||
{
|
{
|
||||||
throw JsonSerializationException.Create(reader, "The number of field values does not match the number of properties definied by union '{0}'.".FormatWith(CultureInfo.InvariantCulture, caseName));
|
throw JsonSerializationException.Create(reader, "The number of field values does not match the number of properties defined by union '{0}'.".FormatWith(CultureInfo.InvariantCulture, caseName));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < fields.Count; i++)
|
for (int i = 0; i < fields.Count; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user