public override void WriteString(string text)
{
if (HasOpenAttribute && (text != null))
{
_attributeText += text;
}
else
{
if (text == null)
{
text = string.Empty;
}
// do work only when not indenting whitespace
if (!((_dataType == JsonDataType.Array || _dataType == JsonDataType.Object || _nodeType == JsonNodeType.EndElement) && XmlConverter.IsWhitespace(text)))
{
StartText();
WriteEscapedJsonString(text);
}
}
}