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."); }