-Fix builds
-Added support for multiple fields in a query indexer -Renamed DisallowIntegerValues to AllowIntegerValues
This commit is contained in:
@@ -376,7 +376,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
try
|
||||
{
|
||||
var serializer = new JsonSerializer();
|
||||
serializer.Converters.Add(new StringEnumConverter { DisallowIntegerValues = true });
|
||||
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false });
|
||||
serializer.Deserialize<Bucket>(new JsonTextReader(new StringReader(json)));
|
||||
}
|
||||
catch (JsonSerializationException ex)
|
||||
|
||||
@@ -544,14 +544,23 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void MultipleQuotedIndexes()
|
||||
{
|
||||
JPath path = new JPath("['111119990','3']");
|
||||
Assert.AreEqual(1, path.Filters.Count);
|
||||
Assert.AreEqual(2, ((ArrayMultipleIndexFilter)path.Filters[0]).Indexes.Count);
|
||||
Assert.AreEqual(111119990, ((ArrayMultipleIndexFilter)path.Filters[0]).Indexes[0]);
|
||||
Assert.AreEqual(3, ((ArrayMultipleIndexFilter)path.Filters[0]).Indexes[1]);
|
||||
Assert.AreEqual(2, ((FieldMultipleFilter)path.Filters[0]).Names.Count);
|
||||
Assert.AreEqual("111119990", ((FieldMultipleFilter)path.Filters[0]).Names[0]);
|
||||
Assert.AreEqual("3", ((FieldMultipleFilter)path.Filters[0]).Names[1]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MultipleQuotedIndexesWithWhitespace()
|
||||
{
|
||||
JPath path = new JPath("[ '111119990' , '3' ]");
|
||||
Assert.AreEqual(1, path.Filters.Count);
|
||||
Assert.AreEqual(2, ((FieldMultipleFilter)path.Filters[0]).Names.Count);
|
||||
Assert.AreEqual("111119990", ((FieldMultipleFilter)path.Filters[0]).Names[0]);
|
||||
Assert.AreEqual("3", ((FieldMultipleFilter)path.Filters[0]).Names[1]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -75,4 +75,4 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16808")]
|
||||
[assembly: AssemblyFileVersion("5.0.8.16815")]
|
||||
|
||||
Reference in New Issue
Block a user