-Explicit culture for tests
-Tests
This commit is contained in:
@@ -251,7 +251,7 @@ namespace Newtonsoft.Json
|
||||
get
|
||||
{
|
||||
int depth = _stack.Count;
|
||||
if (IsStartToken(TokenType) || _currentPosition.Type == JsonContainerType.None)
|
||||
if (JsonTokenUtils.IsStartToken(TokenType) || _currentPosition.Type == JsonContainerType.None)
|
||||
return depth;
|
||||
else
|
||||
return depth + 1;
|
||||
@@ -712,7 +712,7 @@ namespace Newtonsoft.Json
|
||||
if (t == JsonToken.Null)
|
||||
return null;
|
||||
|
||||
if (IsPrimitiveToken(t))
|
||||
if (JsonTokenUtils.IsPrimitiveToken(t))
|
||||
{
|
||||
if (Value != null)
|
||||
{
|
||||
@@ -823,7 +823,7 @@ namespace Newtonsoft.Json
|
||||
if (TokenType == JsonToken.PropertyName)
|
||||
Read();
|
||||
|
||||
if (IsStartToken(TokenType))
|
||||
if (JsonTokenUtils.IsStartToken(TokenType))
|
||||
{
|
||||
int depth = Depth;
|
||||
|
||||
@@ -963,37 +963,6 @@ namespace Newtonsoft.Json
|
||||
_currentState = State.Finished;
|
||||
}
|
||||
|
||||
internal static bool IsPrimitiveToken(JsonToken token)
|
||||
{
|
||||
switch (token)
|
||||
{
|
||||
case JsonToken.Integer:
|
||||
case JsonToken.Float:
|
||||
case JsonToken.String:
|
||||
case JsonToken.Boolean:
|
||||
case JsonToken.Undefined:
|
||||
case JsonToken.Null:
|
||||
case JsonToken.Date:
|
||||
case JsonToken.Bytes:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsStartToken(JsonToken token)
|
||||
{
|
||||
switch (token)
|
||||
{
|
||||
case JsonToken.StartObject:
|
||||
case JsonToken.StartArray:
|
||||
case JsonToken.StartConstructor:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private JsonContainerType GetTypeForCloseToken(JsonToken token)
|
||||
{
|
||||
switch (token)
|
||||
|
||||
Reference in New Issue
Block a user