mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
14 lines
409 B
C#
14 lines
409 B
C#
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace NadekoBot.Common;
|
|
|
|
public class RequireObjectPropertiesContractResolver : DefaultContractResolver
|
|
{
|
|
protected override JsonObjectContract CreateObjectContract(Type objectType)
|
|
{
|
|
var contract = base.CreateObjectContract(objectType);
|
|
contract.ItemRequired = Required.DisallowNull;
|
|
return contract;
|
|
}
|
|
} |