public TModel?Deserialize <TModel>(
            StreamReader inputStream,
            Action <JsonSerializerSettings>?settings
            )
            where TModel : class
        {
            // Read from stream directly without closing the stream
            using var jsonReader = new JsonTextReader(inputStream);
            var clonedSettings = CommentedJsonProvider.CloneSettings(this.jsonSettings);

            settings?.Invoke(clonedSettings);

            // Deserialize
            return(JsonSerializer.CreateDefault(clonedSettings).Deserialize <TModel>(jsonReader));
        }
        public void Serialize <TModel>(
            TModel data,
            StreamWriter outputStream,
            Action <JsonSerializerSettings>?settings,
            bool minify = false
            )
            where TModel : class
        {
            // Write to stream directly using the custom JSON writer without closing the stream
            using var writer = new DescriptiveJsonWriter(outputStream)
                  {
                      Minify = minify
                  };

            // Setup JSON Settings
            var clonedSettings = CommentedJsonProvider.CloneSettings(this.jsonSettings);

            settings?.Invoke(clonedSettings);

            // Serialize
            JsonSerializer.CreateDefault(clonedSettings).Serialize(writer, data);
            writer.Flush();
        }