Permalink
Browse files

Back to C# 5

  • Loading branch information...
RSuter committed Jul 5, 2017
1 parent 29198ae commit a53f1f83c48348a9b7e80514685f1441645338f1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/VisualJsonEditor/Models/JsonObjectModel.cs
@@ -79,7 +79,7 @@ public static JsonObjectModel FromJson(JObject obj, JsonSchema4 schema)
var propertySchema = property.Value.ActualPropertySchema;
if (propertySchema.Type.HasFlag(JsonObjectType.Array))
{
var propertyItemSchema = propertySchema.Item?.ActualSchema;
var propertyItemSchema = propertySchema.Item != null ? propertySchema.Item.ActualSchema : null;
if (obj[property.Key] != null)
{
var objects = obj[property.Key].Select(o => o is JObject ?
@@ -151,7 +151,7 @@ public IEnumerable<JsonPropertyModel> Properties
if (property.Value is ObservableCollection<JsonTokenModel>)
{
foreach (var obj in (ObservableCollection<JsonTokenModel>)property.Value)
obj.Schema = propertyInfo.Value.Item?.ActualSchema;
obj.Schema = propertyInfo.Value.Item != null ? propertyInfo.Value.Item.ActualSchema : null;
}
properties.Add(property);
}

0 comments on commit a53f1f8

Please sign in to comment.