-Fixed JsonReader.ReadAsDateTimeOffset error message
This commit is contained in:
@@ -133,7 +133,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(JsonReaderException), ExpectedMessage = "Error reading date. Expected bytes but got Boolean. Line 1, position 14.")]
|
[ExpectedException(typeof(JsonReaderException), ExpectedMessage = "Error reading date. Expected date but got Boolean. Line 1, position 14.")]
|
||||||
public void ReadAsDateTimeOffsetBoolean()
|
public void ReadAsDateTimeOffsetBoolean()
|
||||||
{
|
{
|
||||||
string json = @"{""Offset"":true}";
|
string json = @"{""Offset"":true}";
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ namespace Newtonsoft.Json.Bson
|
|||||||
if (ReaderIsSerializerInArray())
|
if (ReaderIsSerializerInArray())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
throw CreateReaderException(this, "Error reading date. Expected bytes but got {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
|
throw CreateReaderException(this, "Error reading date. Expected date but got {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ namespace Newtonsoft.Json.Linq
|
|||||||
if (ReaderIsSerializerInArray())
|
if (ReaderIsSerializerInArray())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
throw CreateReaderException(this, "Error reading date. Expected bytes but got {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
|
throw CreateReaderException(this, "Error reading date. Expected date but got {0}.".FormatWith(CultureInfo.InvariantCulture, TokenType));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user