Skip to content

Commit

Permalink
Fix #58
Browse files Browse the repository at this point in the history
  • Loading branch information
wakuflair committed Feb 26, 2021
1 parent 5b5b60e commit 41e01bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SettingInfo
public string DisplayName { get; set; }
public string Description { get; set; }
public string Value { get; set; }
public ExtraPropertyDictionary Properties { get; set; }
public Dictionary<string, object> Properties { get; set; }
public string Permission { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Volo.Abp.Application;
using System.Collections.Generic;
using EasyAbp.Abp.SettingUi.Dto;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Authorization;
using Volo.Abp.Json.SystemTextJson;

namespace EasyAbp.Abp.SettingUi
{
Expand All @@ -12,6 +15,14 @@ namespace EasyAbp.Abp.SettingUi
)]
public class SettingUiApplicationContractsModule : AbpModule
{

public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpSystemTextJsonSerializerOptions>(options =>
{
// System.Text.Json seems cannot deserialize the Dictionary<string, object> type properly,
// So we let JSON.NET do this
options.UnsupportedTypes.AddIfNotContains(typeof(List<SettingGroup>));
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class SettingHtmlInfo
public string Group2 { get; }
public string FormName { get; }
public string Type { get; }
public ExtraPropertyDictionary Properties { get; }
public Dictionary<string, object> Properties { get; }

public SettingHtmlInfo(SettingInfo settingInfo)
{
Expand Down

0 comments on commit 41e01bb

Please sign in to comment.