using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; using UAssetAPI.UnrealTypes; namespace UAssetAPI.JSON { public class UAssetContractResolver : DefaultContractResolver { public Dictionary ToBeFilled; protected override JsonConverter ResolveContractConverter(Type objectType) { if (typeof(FName).IsAssignableFrom(objectType)) { return new FNameJsonConverter(ToBeFilled); } return base.ResolveContractConverter(objectType); } public UAssetContractResolver(Dictionary toBeFilled) : base() { ToBeFilled = toBeFilled; } } }