コード例 #1
0
ファイル: JsonSerializer.cs プロジェクト: azraelrabbit/LiteDB
        /// <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();
        }
コード例 #2
0
ファイル: JsonSerializer.cs プロジェクト: azraelrabbit/LiteDB
        /// <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();
        }
コード例 #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());
        }
コード例 #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());
        }