public string GetAttributesAsJSON()
 {
     lock (access_lock)
     {
         return(doc.GetAttributesAsJSON());
     }
 }
        internal static void WriteToDisk(PDFDocument_ThreadUnsafe pdf_document)
        {
            // A little hack to make sure the legacies are updated...
            pdf_document.Tags = pdf_document.Tags;
            pdf_document.DateAddedToDatabase = pdf_document.DateAddedToDatabase;
            pdf_document.DateLastModified    = pdf_document.DateLastModified;
            pdf_document.DateLastRead        = pdf_document.DateLastRead;
            // A little hack to make sure the legacies are updated...

            string json = pdf_document.GetAttributesAsJSON();

            pdf_document.Library.LibraryDB.PutString(pdf_document.Fingerprint, PDFDocumentFileLocations.METADATA, json);
            Logging.Debug("Update metadata DB for PDF document {1}: JSON =\n{0}", json, pdf_document.Fingerprint);
        }