218 references to JsonGlobals
System.Private.DataContractSerialization (218)
System\Runtime\Serialization\Json\ByteArrayHelperWithString.cs (6)
18
writer.WriteAttributeString(string.Empty,
JsonGlobals
.typeString, string.Empty,
JsonGlobals
.arrayString);
21
writer.WriteStartElement(
JsonGlobals
.itemString, string.Empty);
22
writer.WriteAttributeString(string.Empty,
JsonGlobals
.typeString, string.Empty,
JsonGlobals
.numberString);
32
while (actual < count && reader.IsStartElement(
JsonGlobals
.itemString, string.Empty))
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (6)
202
return _rootName ??
JsonGlobals
.rootDictionaryString;
408
writer.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.nullString); // prefix // namespace
547
writer.WriteStartElement("a",
JsonGlobals
.itemString,
JsonGlobals
.itemString);
548
writer.WriteAttributeString(null,
JsonGlobals
.itemString, null, RootName.Value);
System\Runtime\Serialization\Json\JsonClassDataContract.cs (3)
109
jsonWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
126
_typeName = string.IsNullOrEmpty(traditionalDataContract.Namespace.Value) ? traditionalDataContract.Name.Value : string.Concat(traditionalDataContract.Name.Value,
JsonGlobals
.NameValueSeparatorString, XmlObjectSerializerWriteContextComplexJson.TruncateDefaultDataContractNamespace(traditionalDataContract.Namespace.Value));
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (2)
139
JsonFormatGetOnlyReaderDelegate(jsonReader, context, XmlDictionaryString.Empty,
JsonGlobals
.itemDictionaryString, TraditionalCollectionDataContract);
143
o = JsonFormatReaderDelegate(jsonReader, context, XmlDictionaryString.Empty,
JsonGlobals
.itemDictionaryString, TraditionalCollectionDataContract);
System\Runtime\Serialization\Json\JsonDataContract.cs (3)
118
if (reader.MoveToAttribute(
JsonGlobals
.typeString) && (reader.Value ==
JsonGlobals
.nullString))
166
_typeName = string.IsNullOrEmpty(traditionalDataContract.Namespace.Value) ? traditionalDataContract.Name.Value : string.Concat(traditionalDataContract.Name.Value,
JsonGlobals
.NameValueSeparatorString, XmlObjectSerializerWriteContextComplexJson.TruncateDefaultDataContractNamespace(traditionalDataContract.Namespace.Value));
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (1)
980
return ReadValue(itemType,
JsonGlobals
.itemString);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (6)
439
PropertyInfo genericDictionaryKeyProperty = genericDictionaryKeyValueType.GetProperty(
JsonGlobals
.KeyString)!;
440
PropertyInfo genericDictionaryValueProperty = genericDictionaryKeyValueType.GetProperty(
JsonGlobals
.ValueString)!;
607
JsonGlobals
.typeString /* local name */,
609
JsonGlobals
.arrayString /* value */);
616
JsonGlobals
.typeString /* local name */,
618
JsonGlobals
.objectString /* value */);
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (9)
26
string? contentMode = jsonReader.GetAttribute(
JsonGlobals
.typeString);
30
case
JsonGlobals
.nullString:
34
case
JsonGlobals
.booleanString:
37
case
JsonGlobals
.stringString:
41
case
JsonGlobals
.numberString:
44
case
JsonGlobals
.objectString:
48
case
JsonGlobals
.arrayString:
63
jsonWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (8)
82
buffer = ByteArrayHelperWithString.Instance.ReadArray(tempDictionaryReader,
JsonGlobals
.itemString, string.Empty, tempDictionaryReader.Quotas.MaxArrayLength);
86
buffer = ByteArrayHelperWithString.Instance.ReadArray(dictionaryReader,
JsonGlobals
.itemString, string.Empty, dictionaryReader.Quotas.MaxArrayLength);
150
!dateTimeValue.StartsWith(
JsonGlobals
.DateTimeStartGuardReader, StringComparison.Ordinal) ||
151
!dateTimeValue.EndsWith(
JsonGlobals
.DateTimeEndGuardReader, StringComparison.Ordinal))
153
throw new FormatException(SR.Format(SR.JsonInvalidDateTimeString, originalDateTimeValue,
JsonGlobals
.DateTimeStartGuardWriter,
JsonGlobals
.DateTimeEndGuardWriter));
182
long ticks = millisecondsSinceUnixEpoch * 10000 +
JsonGlobals
.unixEpochTicks;
245
while (actual < count && reader.IsStartElement(
JsonGlobals
.itemString, string.Empty))
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (29)
44
writer.WriteString(
JsonGlobals
.NameValueSeparatorString);
56
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
62
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
68
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
74
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
80
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
86
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
92
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
98
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
104
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
110
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.booleanString);
116
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
202
writer.WriteString(
JsonGlobals
.DateTimeStartGuardReader);
203
writer.WriteValue((value.ToUniversalTime().Ticks -
JsonGlobals
.unixEpochTicks) / 10000);
217
writer.WriteString(
JsonGlobals
.DateTimeEndGuardReader);
240
base.WriteStartElement(
JsonGlobals
.itemString,
JsonGlobals
.itemString);
241
base.WriteAttributeString(null,
JsonGlobals
.itemString, null, localName);
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (1)
107
return
JsonGlobals
.itemString;
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (4)
137
localName:
JsonGlobals
.typeString,
139
value:
JsonGlobals
.objectString);
192
localName:
JsonGlobals
.typeString,
194
value:
JsonGlobals
.arrayString);
System\Runtime\Serialization\Json\XmlJsonReader.cs (51)
307
if (IsAttributeValue && !this.IsLocalName(
JsonGlobals
.typeString))
372
if (localName !=
JsonGlobals
.typeString)
380
if (name !=
JsonGlobals
.typeString)
389
if (XmlDictionaryString.GetString(localName) !=
JsonGlobals
.typeString)
444
if (ch ==
JsonGlobals
.EndCollectionByte && IsReadingCollection)
500
else if (ch ==
JsonGlobals
.EndCollectionByte)
506
else if (ch ==
JsonGlobals
.ObjectByte)
511
if (ch ==
JsonGlobals
.EndObjectByte)
517
if (ch ==
JsonGlobals
.MemberSeparatorByte)
524
_charactersToSkipOnNextRead[0] =
JsonGlobals
.MemberSeparatorByte;
534
else if (ch ==
JsonGlobals
.EndObjectByte)
541
if ((ch ==
JsonGlobals
.MemberSeparatorByte) ||
542
(ch ==
JsonGlobals
.EndObjectByte))
556
else if (ch ==
JsonGlobals
.MemberSeparatorByte)
561
else if (ch ==
JsonGlobals
.QuoteByte)
591
JsonGlobals
.QuoteChar)));
609
if (!IsWhitespace(ch) && ch !=
JsonGlobals
.MemberSeparatorByte && ch !=
JsonGlobals
.EndObjectChar && ch !=
JsonGlobals
.EndCollectionByte)
630
if (!IsWhitespace(ch) && ch !=
JsonGlobals
.MemberSeparatorByte && ch !=
JsonGlobals
.EndObjectChar && ch !=
JsonGlobals
.EndCollectionByte)
652
if (ch ==
JsonGlobals
.MemberSeparatorByte || ch ==
JsonGlobals
.EndObjectChar)
656
else if (ch !=
JsonGlobals
.EndCollectionByte)
663
_charactersToSkipOnNextRead[0] =
JsonGlobals
.MemberSeparatorByte;
664
_charactersToSkipOnNextRead[1] =
JsonGlobals
.EndObjectByte;
875
if (ch ==
JsonGlobals
.MemberSeparatorByte || ch ==
JsonGlobals
.EndObjectByte || ch ==
JsonGlobals
.EndCollectionByte
905
else if (ch ==
JsonGlobals
.QuoteByte)
982
if (b == (byte)'\'' || b ==
JsonGlobals
.QuoteByte)
986
if (b ==
JsonGlobals
.NameValueSeparatorByte)
1096
if (ch ==
JsonGlobals
.QuoteByte)
1103
SkipExpectedByteInBufferReader(
JsonGlobals
.NameValueSeparatorByte);
1107
if (BufferReader.GetByte() ==
JsonGlobals
.ObjectByte)
1132
case
JsonGlobals
.QuoteByte:
1150
case
JsonGlobals
.ObjectByte:
1154
case
JsonGlobals
.EndObjectByte:
1165
case
JsonGlobals
.CollectionByte:
1219
if (buffer[offset + 4] ==
JsonGlobals
.QuoteByte)
1267
if (BufferReader.GetByte() ==
JsonGlobals
.QuoteByte)
1380
SkipExpectedByteInBufferReader(
JsonGlobals
.QuoteByte);
1404
SkipExpectedByteInBufferReader(
JsonGlobals
.ObjectByte);
1409
if (ch !=
JsonGlobals
.QuoteByte && ch !=
JsonGlobals
.EndObjectByte)
1446
SkipExpectedByteInBufferReader(
JsonGlobals
.NameValueSeparatorByte);
1448
SkipExpectedByteInBufferReader(
JsonGlobals
.QuoteByte);
1468
if (BufferReader.GetByte() ==
JsonGlobals
.MemberSeparatorByte)
1475
if (BufferReader.GetByte() ==
JsonGlobals
.EndObjectByte)
1493
if ((_scopes != null) && (_scopes.Length >
JsonGlobals
.maxScopeSize))
System\Runtime\Serialization\Json\XmlJsonWriter.cs (64)
227
return
JsonGlobals
.xmlPrefix;
441
case
JsonGlobals
.numberString:
443
ThrowIfServerTypeWritten(
JsonGlobals
.numberString);
447
case
JsonGlobals
.stringString:
449
ThrowIfServerTypeWritten(
JsonGlobals
.stringString);
453
case
JsonGlobals
.arrayString:
455
ThrowIfServerTypeWritten(
JsonGlobals
.arrayString);
459
case
JsonGlobals
.objectString:
464
case
JsonGlobals
.nullString:
466
ThrowIfServerTypeWritten(
JsonGlobals
.nullString);
470
case
JsonGlobals
.booleanString:
472
ThrowIfServerTypeWritten(
JsonGlobals
.booleanString);
569
_nodeWriter.WriteText(
JsonGlobals
.EndCollectionChar);
581
throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType,
JsonGlobals
.typeString,
JsonGlobals
.objectString,
JsonGlobals
.serverTypeString));
588
throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType,
JsonGlobals
.itemString, string.Empty,
JsonGlobals
.itemString));
595
_nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
596
_nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
627
_nodeWriter.WriteText(
JsonGlobals
.EndObjectChar);
710
if (IsWritingNameWithMapping && prefix ==
JsonGlobals
.xmlnsPrefix)
724
if (IsWritingNameWithMapping && ns == xmlnsNamespace && localName !=
JsonGlobals
.xmlnsPrefix)
726
prefix =
JsonGlobals
.xmlnsPrefix;
733
prefix =
JsonGlobals
.xmlnsPrefix;
735
else if (string.IsNullOrEmpty(prefix) && localName ==
JsonGlobals
.xmlnsPrefix && ns == xmlnsNamespace)
737
prefix =
JsonGlobals
.xmlnsPrefix;
758
if (prefix ==
JsonGlobals
.xmlnsPrefix)
762
else if (localName ==
JsonGlobals
.typeString)
766
throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.typeString));
771
else if (localName ==
JsonGlobals
.serverTypeString)
775
throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.serverTypeString));
781
JsonGlobals
.serverTypeString,
JsonGlobals
.typeString, _dataType.ToString().ToLowerInvariant(),
JsonGlobals
.objectString));
786
else if (localName ==
JsonGlobals
.itemString)
790
throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.itemString));
866
if (!localName.Equals(
JsonGlobals
.rootString))
868
throw new XmlException(SR.Format(SR.JsonInvalidRootElementName, localName,
JsonGlobals
.rootString));
891
else if (!localName.Equals(
JsonGlobals
.itemString))
893
throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName,
JsonGlobals
.itemString));
902
_nodeWriter.WriteText(
JsonGlobals
.MemberSeparatorChar);
916
else if (!localName.Equals(
JsonGlobals
.itemString))
918
throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName,
JsonGlobals
.itemString));
1095
return (ch == FORWARD_SLASH || ch ==
JsonGlobals
.QuoteChar || ch < WHITESPACE || ch == BACK_SLASH
1161
if ((_scopes != null) && (_scopes.Length >
JsonGlobals
.maxScopeSize))
1191
throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType,
JsonGlobals
.typeString,
JsonGlobals
.objectString,
JsonGlobals
.serverTypeString));
1198
throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType,
JsonGlobals
.itemString, string.Empty,
JsonGlobals
.itemString));
1227
throw new XmlException(SR.Format(SR.JsonInvalidDataTypeSpecifiedForServerType,
JsonGlobals
.typeString, dataTypeSpecified,
JsonGlobals
.serverTypeString,
JsonGlobals
.objectString));
1245
if (localName.Equals(
JsonGlobals
.itemString) && ns.Equals(
JsonGlobals
.itemString))
1262
_nodeWriter.WriteText(
JsonGlobals
.CollectionChar);
1269
_nodeWriter.WriteText(
JsonGlobals
.ObjectChar);
1275
_nodeWriter.WriteText(
JsonGlobals
.nullString);
1301
if (ch == FORWARD_SLASH || ch ==
JsonGlobals
.QuoteChar)
1357
_nodeWriter.WriteText(
JsonGlobals
.NameValueSeparatorChar);
1366
_nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
1445
WriteStartElement(
JsonGlobals
.serverTypeString);
1473
_nodeWriter.WriteText(
JsonGlobals
.WhitespaceChar);
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (14)
92
_extensionDataValueType = xmlReader.GetAttribute(
JsonGlobals
.typeString);
102
case
JsonGlobals
.stringString:
105
case
JsonGlobals
.booleanString:
108
case
JsonGlobals
.numberString:
150
if (xmlReader.MoveToAttribute(
JsonGlobals
.typeString) && xmlReader.Value ==
JsonGlobals
.nullString)
154
else if (xmlReader.MoveToAttribute(
JsonGlobals
.serverTypeString))
249
return xmlReader.GetAttribute(
JsonGlobals
.typeString) ==
JsonGlobals
.arrayString;
254
return xmlReader.GetAttribute(
JsonGlobals
.typeString) ==
JsonGlobals
.objectString;
291
if (xmlReader.IsStartElement(
JsonGlobals
.itemDictionaryString,
JsonGlobals
.itemDictionaryString))
293
if (xmlReader.MoveToAttribute(
JsonGlobals
.itemString))
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (11)
70
WriteTypeInfo(writer, string.Concat(dataContractName,
JsonGlobals
.NameValueSeparatorString, TruncateDefaultDataContractNamespace(dataContractNamespace)));
89
return string.Concat("#", dataContractNamespace.AsSpan(
JsonGlobals
.DataContractXsdBaseNamespaceLength));
145
writer.WriteAttributeString(null,
JsonGlobals
.serverTypeString, null, typeInformation);
168
get { return
JsonGlobals
.itemDictionaryString; }
286
xmlWriter.WriteStartElement("a",
JsonGlobals
.itemString,
JsonGlobals
.itemString);
287
xmlWriter.WriteAttributeString(null,
JsonGlobals
.itemString, null, memberNames[index].Value);
298
xmlWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
303
xmlWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.arrayString);