> For the complete documentation index, see [llms.txt](https://prethink.gitbook.io/prtelegrambot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prethink.gitbook.io/prtelegrambot/ru/api/klassy/jsonserializerwrapper.md).

# JsonSerializerWrapper

```c#
using PRTelegramBot.Interfaces;
using System.Text.Json;

namespace PRTelegramBot.Wrappers
{
    /// <summary>
    /// Сериализатор данных Json.
    /// </summary>
    public class JsonSerializerWrapper : IPRSerializer
    {
        #region Поля и свойства

        /// <summary>
        /// Опции сериализации. 
        /// </summary>
        private readonly JsonSerializerOptions options;

        #endregion

        #region IPRSerializator

        /// <inheritdoc />
        public T Deserialize<T>(string data)
        {
            return JsonSerializer.Deserialize<T>(data, options);
        }

        /// <inheritdoc />
        public string Serialize<T>(T data)
        {
            return JsonSerializer.Serialize<T>(data, options);
        }

        #endregion

        #region Конструкторы    

        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="options">Параметры сериализации.</param>
        public JsonSerializerWrapper(JsonSerializerOptions options = null)
        {
            this.options = options;
        }

        #endregion
    }
}

```
