예제 #1
0
        public static ACLSet FromJSON(string jsonfilename)
        {
            return(GZfileIO.ReadGZtoPOCO <ACLSet>(jsonfilename));
            //return GZfileIO.ReadGZtoJson<ACLSet>(jsonfilename);
            //var json = GZfileIO.ReadGZtoString(jsonfilename);

            ////var deserializer = new JavaScriptSerializer

            //var deserializer = new DataContractJsonSerializer(typeof(ACLSet));
            //return (ACLSet)deserializer.ReadObject(json);

            //using (var sr = new FileStream(jsonfilename, FileMode.Open, FileAccess.Read))
            //{
            //    var deserializer = new DataContractJsonSerializer(typeof(ACLSet));
            //    return (ACLSet)deserializer.ReadObject(sr);
            //}
        }
예제 #2
0
 public static CIMDirectoryCollection FromJSON(string jsonfilename)
 {
     return(GZfileIO.ReadGZtoPOCO <CIMDirectoryCollection>(jsonfilename));
     //return GZfileIO.ReadGZtoJson<CIMDirectoryCollection>(jsonfilename);
 }