Skip to content

Commit c6ed991

Browse files
authored
Merge pull request #37 from ignus2/master
Fixed null string implicit conversion
2 parents 029f124 + 0ffec13 commit c6ed991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SimpleJSON.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public virtual JSONObject AsObject
363363

364364
public static implicit operator JSONNode(string s)
365365
{
366-
return new JSONString(s);
366+
return (s is null) ? (JSONNode) JSONNull.CreateOrGet() : new JSONString(s);
367367
}
368368
public static implicit operator string(JSONNode d)
369369
{

0 commit comments

Comments
 (0)