コード例 #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;
        }
コード例 #2
0
        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;
        }