Beispiel #1
0
        private JavaScriptArray PopulateJavaScriptArray(JsonReader reader)
        {
            JavaScriptArray array = new JavaScriptArray();

            while (reader.Read())
            {
                switch (reader.TokenType)
                {
                case JsonToken.Comment:
                    break;

                case JsonToken.EndArray:
                    return(array);

                default:
                {
                    object obj2 = this.GetObject(reader, null);
                    array.Add(obj2);
                    break;
                }
                }
            }
            throw new JsonSerializationException("Unexpected end while deserializing array.");
        }
Beispiel #2
0
		private JavaScriptArray PopulateJavaScriptArray(JsonReader reader)
		{
			JavaScriptArray jsArray = new JavaScriptArray();

			while (reader.Read())
			{
				switch (reader.TokenType)
				{
					case JsonToken.EndArray:
						return jsArray;
					case JsonToken.Comment:
						break;
					default:
						object value = GetObject(reader, null);

						jsArray.Add(value);
						break;
				}
			}

			throw new JsonSerializationException("Unexpected end while deserializing array.");
		}