Skip to content

Commit 0ffec13

Browse files
committed
Fixed null string implicit conversion
1 parent 029f124 commit 0ffec13

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)