private static ICloudFileSystemEntry ParseSingleEntry(IStorageProviderSession session, String json, JsonHelper parser)
        {
            if (json == null)
                return null;

            if (parser == null)
                parser = CreateParser(json);

            if (ContainsError(json, false, parser))
                return null;

            BaseFileEntry entry;

            var type = parser.GetProperty("type");

            if (!IsFolderType(type) && !IsFileType(type))
                return null;

            var id = parser.GetProperty("id");
            var name = parser.GetProperty("name");
            var parentID = parser.GetProperty("parent_id");
            var uploadLocation = parser.GetProperty("upload_location");
            var updatedTime = Convert.ToDateTime(parser.GetProperty("updated_time")).ToUniversalTime();

            if (IsFolderType(type))
            {
                int count = parser.GetPropertyInt("count");
                entry = new BaseDirectoryEntry(name, count, updatedTime, session.Service, session) {Id = id};
            }
            else
            {
                var size = Convert.ToInt64(parser.GetProperty("size"));
                entry = new BaseFileEntry(name, size, updatedTime, session.Service, session) {Id = id};
            }
            entry[SkyDriveConstants.UploadLocationKey] = uploadLocation;

            if (!String.IsNullOrEmpty(parentID))
            {
                entry.ParentID = SkyDriveConstants.RootIDRegex.IsMatch(parentID) ? "/" : parentID;   
            }
            else
            {
                entry.Name = "/";
                entry.Id = "/";
            }

            entry[SkyDriveConstants.InnerIDKey] = id;
            entry[SkyDriveConstants.TimestampKey] = DateTime.UtcNow.ToString(CultureInfo.InvariantCulture);

            return entry;
        }
        internal DropBoxAccountInfo(String jmstext)
        {
            var jh = new JsonHelper();
            if (!jh.ParseJsonMessage(jmstext))
                return;

            Country = jh.GetProperty("country");
            DisplayName = jh.GetProperty("display_name");
            UserId = jh.GetPropertyInt("uid");

            var quotainfo = jh.GetSubObjectString("quota_info");
            if (quotainfo != null)
                QuotaInfo = new DropBoxQuotaInfo(quotainfo.ToString());
        }