-Fixed inconsistent JsonTextReader.LinePosition

-Fixed JsonReader.Path with escaped property names
This commit is contained in:
James Newton-King
2015-10-03 17:11:45 +13:00
parent a3193a9523
commit 172c1d8f30
18 changed files with 169 additions and 94 deletions
+2 -2
View File
@@ -104,7 +104,7 @@ namespace Newtonsoft.Json
private void OnNewLine(int pos)
{
_lineNumber++;
_lineStartPos = pos - 1;
_lineStartPos = pos;
}
private void ParseString(char quote)
@@ -1657,7 +1657,7 @@ namespace Newtonsoft.Json
{
get
{
if (CurrentState == State.Start && LinePosition == 0)
if (CurrentState == State.Start && LinePosition == 0 && TokenType != JsonToken.Comment)
return 0;
return _lineNumber;