Пример #1
0
        public void WriteStringSkipEscape(ReadOnlySpan <byte> propertyName, ReadOnlySpan <byte> value)
        {
            JsonWriterHelper.ValidatePropertyAndValue(ref propertyName, ref value);

            WriteStringSuppressTrue(ref propertyName, ref value);

            _currentDepth |= 1 << 31;
            _tokenType     = JsonTokenType.String;
        }
        public void WriteString(ReadOnlySpan <char> propertyName, ReadOnlySpan <byte> value, bool suppressEscaping = false)
        {
            JsonWriterHelper.ValidatePropertyAndValue(ref propertyName, ref value);

            if (!suppressEscaping)
            {
                WriteStringSuppressFalse(ref propertyName, ref value);
            }
            else
            {
                WriteStringSuppressTrue(ref propertyName, ref value);
            }

            _currentDepth |= 1 << 31;
            _tokenType     = JsonTokenType.String;
        }