Parse() public method

public Parse ( ) : JsonObject
return JsonObject
示例#1
0
 public static JsonObject FromStream(Stream stream)
 {
     using (var reader = new StreamReader(stream))
         using (var parser = new StreamParser(reader)) {
             return(parser.Parse());
         }
 }
示例#2
0
        public static JsonObject FromFile(string path)
        {
            const int bufferSize = 8192;

            using (var fileStream = new FileStream(path,
                                                   FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize, FileOptions.SequentialScan))
                using (var reader = new StreamReader(fileStream))
                    using (var parser = new StreamParser(reader)) {
                        return(parser.Parse());
                    }
        }