64 references to JsonNodeType
System.Runtime.Serialization (64)
System\Runtime\Serialization\Json\XmlJsonReader.cs (15)
286JsonNodeType[] scopes; 327return ((scopeDepth > 0) && (scopes[scopeDepth] == JsonNodeType.Collection)); 534EnterJsonScope(JsonNodeType.Object); 570EnterJsonScope(JsonNodeType.Object); 577EnterJsonScope(JsonNodeType.Object); 588EnterJsonScope(JsonNodeType.Element); 1084void EnterJsonScope(JsonNodeType currentNodeType) 1089scopes = new JsonNodeType[4]; 1093JsonNodeType[] newScopes = new JsonNodeType[scopeDepth * 2]; 1100JsonNodeType ExitJsonScope() 1102JsonNodeType nodeTypeToReturn = scopes[scopeDepth]; 1103scopes[scopeDepth] = JsonNodeType.None; 1248EnterJsonScope(JsonNodeType.Collection); 1369EnterJsonScope(JsonNodeType.Object);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (49)
51JsonNodeType nodeType; 53JsonNodeType[] scopes; 173case JsonNodeType.None: 175case JsonNodeType.Element: 177case JsonNodeType.QuotedText: 178case JsonNodeType.StandaloneText: 179case JsonNodeType.EndElement: 227get { return (depth > 0) && (scopes[depth] == JsonNodeType.Collection); } 648if (nodeType != JsonNodeType.None) 677JsonNodeType token = ExitScope(); 678if (token == JsonNodeType.Collection) 683if (nodeType == JsonNodeType.Element) 696else if (nodeType == JsonNodeType.QuotedText) 701else if (nodeType == JsonNodeType.Element) 731Fx.Assert((nodeType == JsonNodeType.StandaloneText) || (nodeType == JsonNodeType.EndElement), 736if (token == JsonNodeType.Element) 740else if (token == JsonNodeType.Object) 745if (nodeType == JsonNodeType.Element) 756if ((depth > 0) && scopes[depth] == JsonNodeType.Element) 765nodeType = JsonNodeType.EndElement; 904if ((nodeType != JsonNodeType.Element) && !wroteServerTypeAttribute) 1023if ((nodeType != JsonNodeType.None) && depth == 0) 1031case JsonNodeType.None: 1038EnterScope(JsonNodeType.Element); 1041case JsonNodeType.Element: 1065EnterScope(JsonNodeType.Element); 1068case JsonNodeType.EndElement: 1091EnterScope(JsonNodeType.Element); 1105nodeType = JsonNodeType.Element; 1122if (!((this.dataType == JsonDataType.Array || this.dataType == JsonDataType.Object || this.nodeType == JsonNodeType.EndElement) && XmlConverter.IsWhitespace(text))) 1298void CheckText(JsonNodeType nextNodeType) 1311if ((nextNodeType == JsonNodeType.StandaloneText) && 1312(nodeType == JsonNodeType.QuotedText)) 1320void EnterScope(JsonNodeType currentNodeType) 1325scopes = new JsonNodeType[4]; 1329JsonNodeType[] newScopes = new JsonNodeType[depth * 2]; 1336JsonNodeType ExitScope() 1338JsonNodeType nodeTypeToReturn = scopes[depth]; 1339scopes[depth] = JsonNodeType.None; 1346nodeType = JsonNodeType.None; 1405CheckText(JsonNodeType.QuotedText); 1406if (nodeType != JsonNodeType.QuotedText) 1410nodeType = JsonNodeType.QuotedText; 1415CheckText(JsonNodeType.StandaloneText); 1416nodeType = JsonNodeType.StandaloneText; 1468EnterScope(JsonNodeType.Collection); 1475EnterScope(JsonNodeType.Object);