-Clean up
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
#if NET20
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
#else
|
||||
@@ -194,7 +195,7 @@ namespace Newtonsoft.Json.Schema
|
||||
throw JsonException.Create(token, token.Path, "Expected object while parsing schema object, got {0}.".FormatWith(CultureInfo.InvariantCulture, token.Type));
|
||||
|
||||
JToken referenceToken;
|
||||
if (schemaObject.TryGetValue(JsonSchemaConstants.ReferencePropertyName, out referenceToken))
|
||||
if (schemaObject.TryGetValue(JsonTypeReflector.RefPropertyName, out referenceToken))
|
||||
{
|
||||
JsonSchema deferredSchema = new JsonSchema();
|
||||
deferredSchema.DeferredReference = (string)referenceToken;
|
||||
|
||||
@@ -63,8 +63,6 @@ namespace Newtonsoft.Json.Schema
|
||||
public const string OptionValuePropertyName = "value";
|
||||
public const string OptionLabelPropertyName = "label";
|
||||
|
||||
public const string ReferencePropertyName = "$ref";
|
||||
|
||||
public static readonly IDictionary<string, JsonSchemaType> JsonSchemaTypeMapping = new Dictionary<string, JsonSchemaType>
|
||||
{
|
||||
{ "string", JsonSchemaType.String },
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Utilities;
|
||||
#if NET20
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
@@ -52,7 +53,7 @@ namespace Newtonsoft.Json.Schema
|
||||
if (schema.Id != null && _resolver.GetSchema(schema.Id) != null)
|
||||
{
|
||||
_writer.WriteStartObject();
|
||||
_writer.WritePropertyName(JsonSchemaConstants.ReferencePropertyName);
|
||||
_writer.WritePropertyName(JsonTypeReflector.RefPropertyName);
|
||||
_writer.WriteValue(schema.Id);
|
||||
_writer.WriteEndObject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user