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