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