diff --git a/ICD.Common.Utils/Extensions/JsonExtensions.cs b/ICD.Common.Utils/Extensions/JsonExtensions.cs index 22ca920..0d9ce11 100644 --- a/ICD.Common.Utils/Extensions/JsonExtensions.cs +++ b/ICD.Common.Utils/Extensions/JsonExtensions.cs @@ -34,6 +34,21 @@ namespace ICD.Common.Utils.Extensions jObject.WriteTo(extends, converter); } + /// + /// Writes the type value. + /// + /// + /// + [PublicAPI] + public static void WriteType(this JsonWriter extends, Type type) + { + if (extends == null) + throw new ArgumentNullException("extends"); + + string assemblyName = type == null ? null : type.AssemblyQualifiedName; + extends.WriteValue(assemblyName); + } + /// /// Gets the current value as an integer. ///