예제 #1
0
        public T ReadJsonFile <T>(string fileName) where T : class, new ()
        {
            T result;

            try
            {
                using (MemoryStream stream = ReadFile(fileName))
                {
                    result = jsonService.Convert <T>(stream);
                }
            }
            catch (Exception)
            {
                result = new T();
            }

            return(result);
        }