-Fixed not parsing some ISO date timezones
-Fixed float schema validation of integer values -Changed writing of IConvertible values to convert objects to strings -Fixed serializing proxy objects with no default constructor
This commit is contained in:
@@ -176,26 +176,47 @@ namespace Newtonsoft.Json.Utilities
|
||||
}
|
||||
else
|
||||
{
|
||||
if (start + 5 < _length
|
||||
if (start + 2 < _length
|
||||
&& Parse2Digit(start + Lz_, out ZoneHour)
|
||||
&& ZoneHour <= 99
|
||||
&& ParseChar(start + Lz_zz, ':')
|
||||
&& Parse2Digit(start + Lz_zz_, out ZoneMinute)
|
||||
&& ZoneMinute <= 99)
|
||||
&& ZoneHour <= 99)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case '-':
|
||||
Zone = ParserTimeZone.LocalWestOfUtc;
|
||||
start += Lz_zz_zz;
|
||||
start += Lz_zz;
|
||||
break;
|
||||
|
||||
case '+':
|
||||
Zone = ParserTimeZone.LocalEastOfUtc;
|
||||
start += Lz_zz_zz;
|
||||
start += Lz_zz;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (start < _length)
|
||||
{
|
||||
if (ParseChar(start, ':'))
|
||||
{
|
||||
start += 1;
|
||||
|
||||
if (start + 1 < _length
|
||||
&& Parse2Digit(start, out ZoneMinute)
|
||||
&& ZoneMinute <= 99)
|
||||
{
|
||||
start += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (start + 1 < _length
|
||||
&& Parse2Digit(start, out ZoneMinute)
|
||||
&& ZoneMinute <= 99)
|
||||
{
|
||||
start += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user