214 references to JsonGlobals
System.Runtime.Serialization (214)
System\Runtime\Serialization\Json\ByteArrayHelperWithString.cs (6)
19
writer.WriteAttributeString(string.Empty,
JsonGlobals
.typeString, string.Empty,
JsonGlobals
.arrayString);
22
writer.WriteStartElement(
JsonGlobals
.itemString, string.Empty);
23
writer.WriteAttributeString(string.Empty,
JsonGlobals
.typeString, string.Empty,
JsonGlobals
.numberString);
33
while (actual < count && reader.IsStartElement(
JsonGlobals
.itemString, string.Empty))
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (6)
222
return rootName ??
JsonGlobals
.rootDictionaryString;
379
writer.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.nullString); // prefix // namespace
504
writer.WriteStartElement("a",
JsonGlobals
.itemString,
JsonGlobals
.itemString);
505
writer.WriteAttributeString(null,
JsonGlobals
.itemString, null, RootName.Value);
System\Runtime\Serialization\Json\JsonClassDataContract.cs (3)
115
jsonWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
135
this.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)
125
JsonFormatGetOnlyReaderDelegate(jsonReader, context, XmlDictionaryString.Empty,
JsonGlobals
.itemDictionaryString, TraditionalCollectionDataContract);
129
o = JsonFormatReaderDelegate(jsonReader, context, XmlDictionaryString.Empty,
JsonGlobals
.itemDictionaryString, TraditionalCollectionDataContract);
System\Runtime\Serialization\Json\JsonDataContract.cs (3)
112
while (reader.MoveToAttribute(
JsonGlobals
.typeString) && (reader.Value ==
JsonGlobals
.nullString))
167
this.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)
1010
return ReadValue(itemType,
JsonGlobals
.itemString);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (6)
481
PropertyInfo genericDictionaryKeyProperty = genericDictionaryKeyValueType.GetProperty(
JsonGlobals
.KeyString);
482
PropertyInfo genericDictionaryValueProperty = genericDictionaryKeyValueType.GetProperty(
JsonGlobals
.ValueString);
640
JsonGlobals
.typeString /* local name */,
642
JsonGlobals
.arrayString /* value */);
649
JsonGlobals
.typeString /* local name */,
651
JsonGlobals
.objectString /* value */);
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (10)
22
string contentMode = jsonReader.GetAttribute(
JsonGlobals
.typeString);
26
case
JsonGlobals
.nullString:
30
case
JsonGlobals
.booleanString:
33
case
JsonGlobals
.stringString:
37
case
JsonGlobals
.numberString:
40
case
JsonGlobals
.objectString:
44
case
JsonGlobals
.arrayString:
61
jsonWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
71
if (value.IndexOfAny(
JsonGlobals
.floatingPointCharacters) == -1)
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (8)
117
buffer = ByteArrayHelperWithString.Instance.ReadArray(tempDictionaryReader,
JsonGlobals
.itemString, string.Empty, tempDictionaryReader.Quotas.MaxArrayLength);
121
buffer = ByteArrayHelperWithString.Instance.ReadArray(dictionaryReader,
JsonGlobals
.itemString, string.Empty, dictionaryReader.Quotas.MaxArrayLength);
189
!dateTimeValue.StartsWith(
JsonGlobals
.DateTimeStartGuardReader, StringComparison.Ordinal) ||
190
!dateTimeValue.EndsWith(
JsonGlobals
.DateTimeEndGuardReader, StringComparison.Ordinal))
193
new FormatException(SR.GetString(SR.JsonInvalidDateTimeString, originalDateTimeValue,
JsonGlobals
.DateTimeStartGuardWriter,
JsonGlobals
.DateTimeEndGuardWriter)));
230
long ticks = millisecondsSinceUnixEpoch * 10000 +
JsonGlobals
.unixEpochTicks;
290
while (actual < count && reader.IsStartElement(
JsonGlobals
.itemString, string.Empty))
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (29)
50
writer.WriteString(
JsonGlobals
.NameValueSeparatorString);
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
.numberString);
116
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.booleanString);
122
writer.WriteAttributeString(
JsonGlobals
.typeString,
JsonGlobals
.numberString);
221
writer.WriteString(
JsonGlobals
.DateTimeStartGuardReader);
222
writer.WriteValue((value.ToUniversalTime().Ticks -
JsonGlobals
.unixEpochTicks) / 10000);
254
writer.WriteString(
JsonGlobals
.DateTimeEndGuardReader);
285
base.WriteStartElement(
JsonGlobals
.itemString,
JsonGlobals
.itemString);
286
base.WriteAttributeString(null,
JsonGlobals
.itemString, null, localName);
System\Runtime\Serialization\Json\XmlJsonReader.cs (51)
307
if (IsAttributeValue && !this.IsLocalName(
JsonGlobals
.typeString))
377
if (localName !=
JsonGlobals
.typeString)
385
if (name !=
JsonGlobals
.typeString)
394
if (XmlDictionaryString.GetString(localName) !=
JsonGlobals
.typeString)
448
if (ch ==
JsonGlobals
.EndCollectionByte && IsReadingCollection)
504
else if (ch ==
JsonGlobals
.EndCollectionByte)
510
else if (ch ==
JsonGlobals
.ObjectByte)
515
if (ch ==
JsonGlobals
.EndObjectByte)
521
if (ch ==
JsonGlobals
.MemberSeparatorByte)
528
charactersToSkipOnNextRead[0] =
JsonGlobals
.MemberSeparatorByte;
538
else if (ch ==
JsonGlobals
.EndObjectByte)
545
if ((ch ==
JsonGlobals
.MemberSeparatorByte) ||
546
(ch ==
JsonGlobals
.EndObjectByte))
560
else if (ch ==
JsonGlobals
.MemberSeparatorByte)
565
else if (ch ==
JsonGlobals
.QuoteByte)
595
JsonGlobals
.QuoteChar)));
613
if (!IsWhitespace(ch) && ch !=
JsonGlobals
.MemberSeparatorByte && ch !=
JsonGlobals
.EndObjectChar && ch !=
JsonGlobals
.EndCollectionByte)
634
if (!IsWhitespace(ch) && ch !=
JsonGlobals
.MemberSeparatorByte && ch !=
JsonGlobals
.EndObjectChar && ch !=
JsonGlobals
.EndCollectionByte)
656
if (ch ==
JsonGlobals
.MemberSeparatorByte || ch ==
JsonGlobals
.EndObjectChar)
660
else if (ch !=
JsonGlobals
.EndCollectionByte)
667
charactersToSkipOnNextRead[0] =
JsonGlobals
.MemberSeparatorByte;
668
charactersToSkipOnNextRead[1] =
JsonGlobals
.EndObjectByte;
947
if (ch ==
JsonGlobals
.MemberSeparatorByte || ch ==
JsonGlobals
.EndObjectByte || ch ==
JsonGlobals
.EndCollectionByte
977
else if (ch ==
JsonGlobals
.QuoteByte)
1062
if (b == (byte)'\'' || b ==
JsonGlobals
.QuoteByte)
1066
if (b ==
JsonGlobals
.NameValueSeparatorByte)
1176
if (ch ==
JsonGlobals
.QuoteByte)
1183
SkipExpectedByteInBufferReader(
JsonGlobals
.NameValueSeparatorByte);
1187
if (BufferReader.GetByte() ==
JsonGlobals
.ObjectByte)
1212
case
JsonGlobals
.QuoteByte:
1230
case
JsonGlobals
.ObjectByte:
1234
case
JsonGlobals
.EndObjectByte:
1245
case
JsonGlobals
.CollectionByte:
1299
if (buffer[offset + 4] ==
JsonGlobals
.QuoteByte)
1347
if (BufferReader.GetByte() ==
JsonGlobals
.QuoteByte)
1460
SkipExpectedByteInBufferReader(
JsonGlobals
.QuoteByte);
1484
SkipExpectedByteInBufferReader(
JsonGlobals
.ObjectByte);
1489
if (ch !=
JsonGlobals
.QuoteByte && ch !=
JsonGlobals
.EndObjectByte)
1526
SkipExpectedByteInBufferReader(
JsonGlobals
.NameValueSeparatorByte);
1528
SkipExpectedByteInBufferReader(
JsonGlobals
.QuoteByte);
1548
if (BufferReader.GetByte() ==
JsonGlobals
.MemberSeparatorByte)
1555
if (BufferReader.GetByte() ==
JsonGlobals
.EndObjectByte)
1573
if ((scopes != null) && (scopes.Length >
JsonGlobals
.maxScopeSize))
System\Runtime\Serialization\Json\XmlJsonWriter.cs (64)
293
return
JsonGlobals
.xmlPrefix;
562
case
JsonGlobals
.numberString:
564
ThrowIfServerTypeWritten(
JsonGlobals
.numberString);
568
case
JsonGlobals
.stringString:
570
ThrowIfServerTypeWritten(
JsonGlobals
.stringString);
574
case
JsonGlobals
.arrayString:
576
ThrowIfServerTypeWritten(
JsonGlobals
.arrayString);
580
case
JsonGlobals
.objectString:
585
case
JsonGlobals
.nullString:
587
ThrowIfServerTypeWritten(
JsonGlobals
.nullString);
591
case
JsonGlobals
.booleanString:
593
ThrowIfServerTypeWritten(
JsonGlobals
.booleanString);
693
nodeWriter.WriteText(
JsonGlobals
.EndCollectionChar);
707
JsonGlobals
.typeString,
JsonGlobals
.objectString,
JsonGlobals
.serverTypeString)));
716
JsonGlobals
.itemString, string.Empty,
JsonGlobals
.itemString)));
723
nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
724
nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
755
nodeWriter.WriteText(
JsonGlobals
.EndObjectChar);
861
if (IsWritingNameWithMapping && prefix ==
JsonGlobals
.xmlnsPrefix)
875
if (IsWritingNameWithMapping && ns == xmlnsNamespace && localName !=
JsonGlobals
.xmlnsPrefix)
877
prefix =
JsonGlobals
.xmlnsPrefix;
884
prefix =
JsonGlobals
.xmlnsPrefix;
886
else if (string.IsNullOrEmpty(prefix) && localName ==
JsonGlobals
.xmlnsPrefix && ns == xmlnsNamespace)
888
prefix =
JsonGlobals
.xmlnsPrefix;
913
if (prefix ==
JsonGlobals
.xmlnsPrefix)
917
else if (localName ==
JsonGlobals
.typeString)
922
new XmlException(SR.GetString(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.typeString)));
927
else if (localName ==
JsonGlobals
.serverTypeString)
932
new XmlException(SR.GetString(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.serverTypeString)));
939
JsonGlobals
.serverTypeString,
JsonGlobals
.typeString, dataType.ToString().ToLowerInvariant(),
JsonGlobals
.objectString)));
944
else if (localName ==
JsonGlobals
.itemString)
949
new XmlException(SR.GetString(SR.JsonAttributeAlreadyWritten,
JsonGlobals
.itemString)));
1033
if (!localName.Equals(
JsonGlobals
.rootString))
1036
new XmlException(SR.GetString(SR.JsonInvalidRootElementName, localName,
JsonGlobals
.rootString)));
1060
else if (!localName.Equals(
JsonGlobals
.itemString))
1063
new XmlException(SR.GetString(SR.JsonInvalidItemNameForArrayElement, localName,
JsonGlobals
.itemString)));
1072
nodeWriter.WriteText(
JsonGlobals
.MemberSeparatorChar);
1086
else if (!localName.Equals(
JsonGlobals
.itemString))
1089
new XmlException(SR.GetString(SR.JsonInvalidItemNameForArrayElement, localName,
JsonGlobals
.itemString)));
1287
return (ch == FORWARD_SLASH || ch ==
JsonGlobals
.QuoteChar || ch < WHITESPACE || ch == BACK_SLASH
1358
if ((scopes != null) && (scopes.Length >
JsonGlobals
.maxScopeSize))
1390
JsonGlobals
.typeString,
JsonGlobals
.objectString,
JsonGlobals
.serverTypeString)));
1399
JsonGlobals
.itemString, string.Empty,
JsonGlobals
.itemString)));
1430
JsonGlobals
.typeString, dataTypeSpecified,
JsonGlobals
.serverTypeString,
JsonGlobals
.objectString)));
1452
if (localName.Equals(
JsonGlobals
.itemString) && ns.Equals(
JsonGlobals
.itemString))
1469
nodeWriter.WriteText(
JsonGlobals
.CollectionChar);
1476
nodeWriter.WriteText(
JsonGlobals
.ObjectChar);
1482
nodeWriter.WriteText(
JsonGlobals
.nullString);
1509
if (ch == FORWARD_SLASH || ch ==
JsonGlobals
.QuoteChar)
1575
nodeWriter.WriteText(
JsonGlobals
.NameValueSeparatorChar);
1584
nodeWriter.WriteText(
JsonGlobals
.QuoteChar);
1666
WriteStartElement(
JsonGlobals
.serverTypeString);
1694
nodeWriter.WriteText(
JsonGlobals
.WhitespaceChar);
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (14)
55
extensionDataValueType = xmlReader.GetAttribute(
JsonGlobals
.typeString);
65
case
JsonGlobals
.stringString:
68
case
JsonGlobals
.booleanString:
71
case
JsonGlobals
.numberString:
145
if (xmlReader.MoveToAttribute(
JsonGlobals
.typeString) && xmlReader.Value ==
JsonGlobals
.nullString)
149
else if (xmlReader.MoveToAttribute(
JsonGlobals
.serverTypeString))
217
if (xmlReader.IsStartElement(
JsonGlobals
.itemDictionaryString,
JsonGlobals
.itemDictionaryString))
219
if (xmlReader.MoveToAttribute(
JsonGlobals
.itemString))
284
return xmlReader.GetAttribute(
JsonGlobals
.typeString) ==
JsonGlobals
.arrayString;
289
return xmlReader.GetAttribute(
JsonGlobals
.typeString) ==
JsonGlobals
.objectString;
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (11)
80
WriteTypeInfo(writer, string.Concat(dataContractName,
JsonGlobals
.NameValueSeparatorString, TruncateDefaultDataContractNamespace(dataContractNamespace)));
99
return string.Concat("#", dataContractNamespace.Substring(
JsonGlobals
.DataContractXsdBaseNamespaceLength));
113
writer.WriteAttributeString(null,
JsonGlobals
.serverTypeString, null, typeInformation);
215
get { return
JsonGlobals
.itemDictionaryString; }
224
xmlWriter.WriteStartElement("a",
JsonGlobals
.itemString,
JsonGlobals
.itemString);
225
xmlWriter.WriteAttributeString(null,
JsonGlobals
.itemString, null, memberNames[index].Value);
234
xmlWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.objectString);
239
xmlWriter.WriteAttributeString(null,
JsonGlobals
.typeString, null,
JsonGlobals
.arrayString);