The implicit string -> JSONNode operator doesn't check for null string, and creates a JSONString with null value (null m_Data), which will later cause an exception/crash in Escape() when it is serialized.
Suggested fix, replace this:
public static implicit operator JSONNode(string s)
{
return new JSONString(s);
}
with this:
public static implicit operator JSONNode(string s)
{
return (s == null) ? (JSONNode) JSONNull.CreateOrGet() : new JSONString(s);
}
The implicit string -> JSONNode operator doesn't check for null string, and creates a JSONString with null value (null m_Data), which will later cause an exception/crash in Escape() when it is serialized. Suggested fix, replace this:
with this: