Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
725 B

using System;
using Newtonsoft.Json;
namespace Volo.Docs.Documents
{
public class NavigationWithDetailsDto : DocumentWithDetailsDto
{
[JsonProperty("items")]
public NavigationNode RootNode { get; set; }
public void ConvertItems()
{
if (Content.IsNullOrEmpty())
{
RootNode = new NavigationNode();
return;
}
try
{
RootNode = JsonConvert.DeserializeObject<NavigationNode>(Content);
}
catch (JsonException ex)
{
//todo: should log the exception?
RootNode = new NavigationNode();
}
}
}
}