-JSON Schema fixes
-Fixed static values being included with fields serialization -Examples! (work in progress)
This commit is contained in:
@@ -201,7 +201,7 @@ namespace Newtonsoft.Json.Schema
|
||||
/// <value>The format.</value>
|
||||
public string Format { get; set; }
|
||||
|
||||
public string Location { get; set; }
|
||||
internal string Location { get; set; }
|
||||
|
||||
private readonly string _internalId = Guid.NewGuid().ToString("N");
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Newtonsoft.Json.Schema
|
||||
else if (currentToken.Type == JTokenType.Array || currentToken.Type == JTokenType.Constructor)
|
||||
{
|
||||
int index;
|
||||
if (int.TryParse(part, out index))
|
||||
if (int.TryParse(part, out index) && index >= 0 && index < currentToken.Count())
|
||||
currentToken = currentToken[index];
|
||||
else
|
||||
currentToken = null;
|
||||
|
||||
Reference in New Issue
Block a user