-JSON Schema fixes

-Fixed static values being included with fields serialization
-Examples! (work in progress)
This commit is contained in:
James Newton-King
2013-01-23 21:39:54 +13:00
parent 9187d8a6b3
commit 68eacc480b
87 changed files with 3519 additions and 53 deletions
+1 -1
View File
@@ -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;