Exemplo n.º 1
0
        /// <summary>
        /// Deserialize a json array as an IEnumerable of BsonValue reading on demand TextReader
        /// </summary>
        public static IEnumerable<BsonValue> DeserializeArray(TextReader reader)
        {
            if (reader == null) throw new ArgumentNullException("reader");

            var jr = new JsonReader(reader);

            return jr.DeserializeArray();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserialize a json array as an IEnumerable of BsonValue
        /// </summary>
        public static IEnumerable<BsonValue> DeserializeArray(string json)
        {
            if (json == null) throw new ArgumentNullException("json");

            var sr = new StringReader(json);
            var reader = new JsonReader(sr);
            return reader.DeserializeArray();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Deserialize a json array as an IEnumerable of BsonValue reading on demand TextReader
        /// </summary>
        public static IEnumerable <BsonValue> DeserializeArray(TextReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            var jr = new JsonReader(reader);

            return(jr.DeserializeArray());
        }
Exemplo n.º 4
0
        /// <summary>
        /// Deserialize a json array as an IEnumerable of BsonValue
        /// </summary>
        public static IEnumerable <BsonValue> DeserializeArray(string json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            var sr     = new StringReader(json);
            var reader = new JsonReader(sr);

            return(reader.DeserializeArray());
        }