public static Task <string> SerializeAsync <TObjectType>(TObjectType obj, CancellationToken cancellationToken = default)
        {
            if (EqualityComparer <TObjectType> .Default.Equals(obj, default))
            {
                throw new ArgumentNullException(nameof(obj), "object must not be null");
            }

            IObjectJsonWriter <TObjectType> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <TObjectType>();

            return(objectJsonWriter.WriteObjectAsync(obj, cancellationToken));
        }
        public Task <string> ToJson(CancellationToken cancellationToken = default)
        {
            IObjectJsonWriter <ITraktSyncRecommendationsPost> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <ITraktSyncRecommendationsPost>();

            return(objectJsonWriter.WriteObjectAsync(this, cancellationToken));
        }
        internal static Task <string> SerializeObject <TObjectType>(TObjectType obj)
        {
            IObjectJsonWriter <TObjectType> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <TObjectType>();

            return(objectJsonWriter.WriteObjectAsync(obj));
        }
        public override Task <string> ToJson(CancellationToken cancellationToken = default)
        {
            IObjectJsonWriter <ITraktMovieCheckinPost> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <ITraktMovieCheckinPost>();

            return(objectJsonWriter.WriteObjectAsync(this, cancellationToken));
        }
        public Task <string> ToJson(CancellationToken cancellationToken = default)
        {
            IObjectJsonWriter <ITraktShowResetWatchedProgressPost> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <ITraktShowResetWatchedProgressPost>();

            return(objectJsonWriter.WriteObjectAsync(this, cancellationToken));
        }
        public Task <string> ToJson(CancellationToken cancellationToken = default)
        {
            IObjectJsonWriter <ITraktUserCustomListsReorderPost> objectJsonWriter = JsonFactoryContainer.CreateObjectWriter <ITraktUserCustomListsReorderPost>();

            return(objectJsonWriter.WriteObjectAsync(this, cancellationToken));
        }