using System;
using System.Collections.Generic;
using MLEM.Misc;
using Newtonsoft.Json;
namespace MLEM.Data.Json {
///
/// An represents an object that can hold generic key-value based data.
/// This class uses for each object stored to ensure that objects with a custom get deserialized as an instance of their original type if is not set to .
/// Note that, using , adding instances directly is also possible.
///
#if NET7_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("The native code for instantiation of JsonTypeSafeWrapper instances might not be available at runtime.")]
#endif
public class JsonTypeSafeGenericDataHolder : IGenericDataHolder {
private static readonly string[] EmptyStrings = new string[0];
[JsonProperty]
private Dictionary data;
///
[Obsolete("This method will be removed in a future update in favor of the generic SetData.")]
public void SetData(string key, object data) {
this.SetData