Octathorpes have no case.
Swapped in StringComparison.Ordinal for the literal comparison against [ and ] since those are non-caseable. This is a micro-improvement, but still good practice.
This commit is contained in:
@@ -98,7 +98,7 @@ namespace Newtonsoft.Json.Schema
|
|||||||
{
|
{
|
||||||
string reference = schema.DeferredReference;
|
string reference = schema.DeferredReference;
|
||||||
|
|
||||||
bool locationReference = (reference.StartsWith("#", StringComparison.OrdinalIgnoreCase));
|
bool locationReference = (reference.StartsWith("#", StringComparison.Ordinal));
|
||||||
if (locationReference)
|
if (locationReference)
|
||||||
reference = UnescapeReference(reference);
|
reference = UnescapeReference(reference);
|
||||||
|
|
||||||
@@ -445,4 +445,4 @@ namespace Newtonsoft.Json.Schema
|
|||||||
return JsonSchemaConstants.JsonSchemaTypeMapping.Single(kv => kv.Value == type).Key;
|
return JsonSchemaConstants.JsonSchemaTypeMapping.Single(kv => kv.Value == type).Key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user