internal unsafe static string ToStringIfString(object value, NetJSONSettings settings) { var str = value as string; if(str != null) { StringBuilder sb = new StringBuilder(); NetJSON.EncodedJSONString(sb, str, settings); return sb.ToString(); } return str; }