Permalink
Browse files

Fixed object generator, closes #14

  • Loading branch information...
RSuter committed Feb 23, 2017
1 parent d9d07c4 commit c495aac6b05be8de179564f3e6cc3a7475cab38c
Showing with 2 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +1 −1 src/VisualJsonEditor/Models/JsonObjectModel.cs
View
@@ -9,3 +9,4 @@
/src/VisualJsonEditor.sln.ide
/src/UpgradeLog.htm
/src/VisualJsonEditor.sln.GhostDoc.xml
+/src/VisualJsonEditor/VisualJsonEditor.previous.nugetreferenceswitcher
@@ -165,7 +165,7 @@ public override JToken ToJToken()
}
else if (pair.Value is JsonTokenModel)
obj[pair.Key] = ((JsonTokenModel)pair.Value).ToJToken();
- else
+ else if (pair.Value != null || Schema.Properties[pair.Key].IsRequired)
obj[pair.Key] = new JValue(pair.Value);
}
return obj;

0 comments on commit c495aac

Please sign in to comment.