Skip to content

Commit

Permalink
Merge pull request #203 from ryanbrandenburg/rybrande/NullResultFix
Browse files Browse the repository at this point in the history
Always return result property on success
  • Loading branch information
david-driscoll authored Jan 21, 2020
2 parents 3bd6340 + 66b13ce commit a8e44c2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ public override void WriteJson(JsonWriter writer, Response value, JsonSerializer
writer.WriteValue("2.0");
writer.WritePropertyName("id");
writer.WriteValue(value.Id);
writer.WritePropertyName("result");
if (value.Result != null)
{
writer.WritePropertyName("result");
serializer.Serialize(writer, value.Result);
}
else{
writer.WriteNull();
}
writer.WriteEndObject();
}
}
Expand Down

0 comments on commit a8e44c2

Please sign in to comment.