211 references to JsonWriterHelper
System.Text.Json (211)
System\Text\Json\Document\JsonDocument.cs (1)
319OperationStatus status = JsonWriterHelper.ToUtf8(otherText, otherUtf8Text, out int written);
System\Text\Json\JsonEncodedText.cs (3)
81JsonWriterHelper.ValidateValue(value); 123JsonWriterHelper.ValidateValue(utf8Value); 129int idx = JsonWriterHelper.NeedsEscaping(utf8Value, encoder);
System\Text\Json\JsonHelpers.Escaping.cs (5)
16int idx = JsonWriterHelper.NeedsEscaping(utf8Value, encoder); 38int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); 44JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, encoder, out int written); 66int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); 72JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, encoder, out int written);
System\Text\Json\Reader\Utf8JsonReader.cs (1)
552OperationStatus status = JsonWriterHelper.ToUtf8(text, otherUtf8Text, out int written);
System\Text\Json\Serialization\JsonSerializerOptions.cs (3)
718JsonWriterHelper.ValidateIndentCharacter(value); 740JsonWriterHelper.ValidateIndentSize(value); 781JsonWriterHelper.ValidateNewLine(value);
System\Text\Json\Writer\JsonWriterOptions.cs (3)
58JsonWriterHelper.ValidateIndentCharacter(value); 76JsonWriterHelper.ValidateIndentSize(value); 155JsonWriterHelper.ValidateNewLine(value);
System\Text\Json\Writer\Utf8JsonWriter.cs (7)
680int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 715int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 721JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 835int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 870int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 876JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 1040JsonWriterHelper.WriteIndentation(buffer, indent, _indentByte);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (8)
73JsonWriterHelper.ValidatePropertyNameLength(propertyName); 97JsonWriterHelper.ValidatePropertyNameLength(utf8PropertyName); 107int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 123int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 144int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 150JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 167int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 173JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (13)
79JsonWriterHelper.ValidateProperty(propertyName); 104JsonWriterHelper.ValidateProperty(utf8PropertyName); 114int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 130int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 151int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 157JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 174int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 180JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 244JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 278JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 327JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 376JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 385JsonWriterHelper.WriteDateTimeTrimmed(buffer, value, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (13)
78JsonWriterHelper.ValidateProperty(propertyName); 103JsonWriterHelper.ValidateProperty(utf8PropertyName); 113int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 129int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 150int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 156JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 173int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 179JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 243JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 277JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 326JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 375JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 384JsonWriterHelper.WriteDateTimeOffsetTrimmed(buffer, value, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (8)
78JsonWriterHelper.ValidateProperty(propertyName); 103JsonWriterHelper.ValidateProperty(utf8PropertyName); 113int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 129int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 150int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 156JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 173int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 179JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (12)
28JsonWriterHelper.ValidateDouble(value); 80JsonWriterHelper.ValidateProperty(propertyName); 81JsonWriterHelper.ValidateDouble(value); 106JsonWriterHelper.ValidateProperty(utf8PropertyName); 107JsonWriterHelper.ValidateDouble(value); 117int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 133int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 154int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 160JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 177int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 183JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 375JsonWriterHelper.ValidateDouble(value);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (11)
28JsonWriterHelper.ValidateSingle(value); 80JsonWriterHelper.ValidateProperty(propertyName); 81JsonWriterHelper.ValidateSingle(value); 106JsonWriterHelper.ValidateProperty(utf8PropertyName); 107JsonWriterHelper.ValidateSingle(value); 117int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 133int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 154int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 160JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 177int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 183JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (14)
31JsonWriterHelper.ValidateProperty(propertyName); 32JsonWriterHelper.ValidateValue(utf8FormattedNumber); 33JsonWriterHelper.ValidateNumber(utf8FormattedNumber); 61JsonWriterHelper.ValidateProperty(utf8PropertyName); 62JsonWriterHelper.ValidateValue(utf8FormattedNumber); 63JsonWriterHelper.ValidateNumber(utf8FormattedNumber); 73JsonWriterHelper.ValidateValue(utf8FormattedNumber); 74JsonWriterHelper.ValidateNumber(utf8FormattedNumber); 84int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 100int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 121int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 127JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 144int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 150JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (8)
78JsonWriterHelper.ValidateProperty(propertyName); 103JsonWriterHelper.ValidateProperty(utf8PropertyName); 113int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 129int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 150int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 156JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 173int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 179JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (1)
208OperationStatus status = JsonWriterHelper.ToUtf8(escapedPropertyName, output.Slice(BytesPending), out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (10)
98JsonWriterHelper.ValidateProperty(propertyName); 123JsonWriterHelper.ValidateProperty(utf8PropertyName); 197JsonWriterHelper.ValidateProperty(propertyName); 223JsonWriterHelper.ValidateProperty(utf8PropertyName); 235int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 251int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 272int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 278JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 295int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 301JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (8)
78JsonWriterHelper.ValidateProperty(propertyName); 103JsonWriterHelper.ValidateProperty(utf8PropertyName); 189int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 205int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 226int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 232JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 249int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 255JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (53)
94JsonWriterHelper.ValidateProperty(propertyName); 96int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 122int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 134JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 243JsonWriterHelper.ValidateProperty(utf8PropertyName); 245int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 264JsonWriterHelper.ValidateProperty(utf8PropertyName); 281int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 293JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 521JsonWriterHelper.ValidatePropertyAndValue(propertyName, value); 545JsonWriterHelper.ValidatePropertyAndValue(utf8PropertyName, utf8Value); 606JsonWriterHelper.ValidateValue(value); 608int valueIdx = JsonWriterHelper.NeedsEscaping(value, _options.Encoder); 667JsonWriterHelper.ValidatePropertyAndValue(utf8PropertyName, value); 696JsonWriterHelper.ValidateValue(utf8Value); 698int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Value, _options.Encoder); 757JsonWriterHelper.ValidatePropertyAndValue(propertyName, utf8Value); 786JsonWriterHelper.ValidateProperty(propertyName); 788int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 858JsonWriterHelper.ValidateProperty(utf8PropertyName); 860int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 916int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndex); 922JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndex, _options.Encoder, out int written); 939int length = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndex); 945JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndex, _options.Encoder, out int written); 962int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndex); 968JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndex, _options.Encoder, out int written); 985int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndex); 991JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndex, _options.Encoder, out int written); 1003int valueIdx = JsonWriterHelper.NeedsEscaping(value, _options.Encoder); 1004int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 1022int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Value, _options.Encoder); 1023int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 1041int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Value, _options.Encoder); 1042int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 1060int valueIdx = JsonWriterHelper.NeedsEscaping(value, _options.Encoder); 1061int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 1088int length = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndexVal); 1100JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written); 1108int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 1120JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 1148int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); 1160JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written); 1168int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 1180JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 1208int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); 1220JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written); 1228int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 1240JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 1268int length = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndexVal); 1280JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written); 1288int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 1300JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (8)
81JsonWriterHelper.ValidateProperty(propertyName); 107JsonWriterHelper.ValidateProperty(utf8PropertyName); 198int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder); 214int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder); 235int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); 241JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written); 258int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); 264JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (5)
48JsonWriterHelper.ValidateValue(value); 92OperationStatus status = JsonWriterHelper.ToUtf8(value, output.Slice(BytesPending), out int written); 133OperationStatus status = JsonWriterHelper.ToUtf8(value, output.Slice(BytesPending), out int written); 158JsonWriterHelper.ValidateValue(utf8Value); 165if (!JsonWriterHelper.IsValidUtf8String(utf8Value))
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (2)
60JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 98JsonWriterHelper.WriteDateTimeTrimmed(output.Slice(BytesPending), value, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (2)
61JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten); 99JsonWriterHelper.WriteDateTimeOffsetTrimmed(output.Slice(BytesPending), value, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (1)
26JsonWriterHelper.ValidateDouble(value);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (1)
26JsonWriterHelper.ValidateSingle(value);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (2)
26JsonWriterHelper.ValidateValue(utf8FormattedNumber); 27JsonWriterHelper.ValidateNumber(utf8FormattedNumber);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (8)
74JsonWriterHelper.ValidateValue(value); 84int valueIdx = JsonWriterHelper.NeedsEscaping(value, _options.Encoder); 190int length = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndexVal); 196JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written); 221JsonWriterHelper.ValidateValue(utf8Value); 231int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Value, _options.Encoder); 337int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); 343JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, _options.Encoder, out int written);