-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
@@ -429,7 +429,7 @@ namespace Newtonsoft.Json.Tests.Serialization
{
JsonConvert.DeserializeObject<string[][]>(json,
new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.All });
}, @"Cannot preserve reference to array or readonly list, or list created from a non-default constructor: System.String[][]. Path '$values', line 3, position 15.");
}, @"Cannot preserve reference to array or readonly list, or list created from a non-default constructor: System.String[][]. Path '$values', line 3, position 14.");
}
public class CircularDictionary : Dictionary<string, CircularDictionary>
@@ -479,7 +479,7 @@ namespace Newtonsoft.Json.Tests.Serialization
PreserveReferencesHandling = PreserveReferencesHandling.All,
MetadataPropertyHandling = MetadataPropertyHandling.Default
});
}, @"Unexpected end when deserializing object. Path '$id', line 2, position 9.");
}, @"Unexpected end when deserializing object. Path '$id', line 2, position 8.");
}
public class CircularReferenceClassConverter : JsonConverter
@@ -1244,7 +1244,7 @@ namespace Newtonsoft.Json.Tests.Serialization
ExceptionAssert.Throws<JsonSerializationException>(() => JsonConvert.DeserializeObject<PropertyItemIsReferenceObject>(json, new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Default
}), "Error reading object reference '1'. Path 'Data.Prop2.MyProperty', line 9, position 20.");
}), "Error reading object reference '1'. Path 'Data.Prop2.MyProperty', line 9, position 19.");
}
}