Skip to content
Browse files

removing nulls if something is false

  • Loading branch information...
1 parent acd6735 commit 39cf0bc43a5d7e036acf0333a2f75c09e4228163 @cesardv committed Apr 24, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/JsonMaker/JsonMaker/WindowsFormsApplication1/Form1.cs
View
4 src/JsonMaker/JsonMaker/WindowsFormsApplication1/Form1.cs
@@ -55,15 +55,15 @@ public Form1()
{
obj += string.Format("\n\t\"hasHealthIssue\": true, \n\t\"healthIssue\" : \n\t{{ \n\t\"issue\":\"{0}\" \n\n\t}}, \n\n", healthIssue.Text);
}
- else obj += "\n\t\"hasHealthIssue\": false, \n\t\"healthIssue\" : null, ";
+ else obj += "\n\t\"hashealthIssues\": false, \n\t\"healthIssues\" : { \"issue\" : \"None.\"}, ";
if (HasTrainingTips.SelectedItem.ToString() == "True")
{
obj += string.Format(" \n\t\"hasTrainingTip\": true, \n\t\"trainingTip\" : \n\n\t{{ \n\t\"tip\":\"{0}\" \n\t}}, \n", TrainingTips.Text);
}
else
{
- obj += " \n\t\"hasTrainingTip\": false, \n\t\"trainingTip\" : null, ";
+ obj += " \n\t\"hasTrainingTip\": false, \n\t\"trainingTip\" :{ \"tip\" : \"None.\"}, ";
}
obj += string.Format("\n\t\"height\" : \"{0}\" ",heightTxtbox.Text);

0 comments on commit 39cf0bc

Please sign in to comment.
Something went wrong with that request. Please try again.