C# SafeJsonConvert serializes null into string "null" -- it should be string.Empty
The issue is here: public static string SerializeObject(object obj, JsonSerializerSettings settings) in SafeJsonConvert.cs -- it seems to turn a null obj parameter into a the string "null" -- it should be turned into the empty string I think.
Actually, the title of this is a bit incorrect. The real issue is that passing a null parameter as a body parameter in C# results in the string "null"
I will submit a fix to avoid this.
Fix is here
This is fixed now
@matthchr I skimmed the PR, but I just want to confirm: This was fixed by avoiding a call to SafeJsonConvert.SerializeObject(null), not by modifying SafeJsonConvert itself, correct?
Yes, SafeJsonConvert internally called Newtonsoft's serialization method, and the default behavior of Newtonsoft's serialization method is that it serializes null to "null" - there's not an easy way to change the behavior of Newtonsoft's handling of the value null (you can change it's handling of null properties but that's a bit different).
Closing -- bug reported fixed.