/// <summary>
 /// Constructor for serialization purpose
 /// </summary>
 private BacktraceDatabaseRecord(BacktraceDatabaseRawRecord rawRecord)
 {
     Id                 = new Guid(rawRecord.Id);
     RecordPath         = rawRecord.recordName;
     DiagnosticDataPath = rawRecord.dataPath;
     Size               = rawRecord.size;
     Hash               = rawRecord.hash;
     Attachments        = rawRecord.attachments;
 }
        /// <summary>
        /// Convert current record to JSON
        /// </summary>
        /// <returns>Record JSON representation</returns>
        public string ToJson()
        {
            var rawRecord = new BacktraceDatabaseRawRecord()
            {
                Id          = Id.ToString(),
                recordName  = RecordPath,
                dataPath    = DiagnosticDataPath,
                size        = Size,
                hash        = Hash,
                attachments = new List <string>(Attachments)
            };

            return(JsonUtility.ToJson(rawRecord, false));
        }