Shorter JSON property names for nucache (#8204)

This commit is contained in:
Chad
2020-06-02 21:35:19 +12:00
committed by GitHub
parent 717bbf1e2e
commit a4274ba767
4 changed files with 94 additions and 45 deletions

View File

@@ -8,16 +8,29 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
/// </summary>
internal class CultureVariation
{
[JsonProperty("name")]
[JsonProperty("nm")]
public string Name { get; set; }
[JsonProperty("urlSegment")]
[JsonProperty("us")]
public string UrlSegment { get; set; }
[JsonProperty("date")]
[JsonProperty("dt")]
public DateTime Date { get; set; }
[JsonProperty("isDraft")]
[JsonProperty("isd")]
public bool IsDraft { get; set; }
//Legacy properties used to deserialize existing nucache db entries
[JsonProperty("name")]
private string LegacyName { set { Name = value; } }
[JsonProperty("urlSegment")]
private string LegacyUrlSegment { set { UrlSegment = value; } }
[JsonProperty("date")]
private DateTime LegacyDate { set { Date = value; } }
[JsonProperty("isDraft")]
private bool LegacyIsDraft { set { IsDraft = value; } }
}
}