<commit_before>﻿namespace TraktApiSharp.Utils
{
    using Newtonsoft.Json;
    using System.Threading.Tasks;

    internal static class Json
    {
        internal static readonly JsonSerializerSettings DEFAULT_JSON_SETTINGS
            = new JsonSerializerSettings
            {
                Formatting = Formatting.None,
                NullValueHandling = NullValueHandling.Ignore
            };

        internal static string Serialize(object value)
        {
            return JsonConvert.SerializeObject(value, DEFAULT_JSON_SETTINGS);
        }

        internal static TResult Deserialize<TResult>(string value)
        {
            return JsonConvert.DeserializeObject<TResult>(value, DEFAULT_JSON_SETTINGS);
        }

        internal static async Task<string> SerializeAsync(object value)
        {
            return await Task.Run(() => JsonConvert.SerializeObject(value, DEFAULT_JSON_SETTINGS));
        }

        internal static async Task<TResult> DeserializeAsync<TResult>(string value)
        {
            return await Task.Run(() => JsonConvert.DeserializeObject<TResult>(value, DEFAULT_JSON_SETTINGS));
        }
    }
}<commit_msg>Remove async helper methods for json serialization.<commit_after>﻿namespace TraktApiSharp.Utils
{
    using Newtonsoft.Json;

    internal static class Json
    {
        internal static readonly JsonSerializerSettings DEFAULT_JSON_SETTINGS
            = new JsonSerializerSettings
            {
                Formatting = Formatting.None,
                NullValueHandling = NullValueHandling.Ignore
            };

        internal static string Serialize(object value)
        {
            return JsonConvert.SerializeObject(value, DEFAULT_JSON_SETTINGS);
        }

        internal static TResult Deserialize<TResult>(string value)
        {
            return JsonConvert.DeserializeObject<TResult>(value, DEFAULT_JSON_SETTINGS);
        }
    }
}
{'fraction_non_alphanumeric': 0.06677099634846113, 'fraction_numerical': 0.0, 'mean_word_length': 2.412811387900356, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4808142', 'n_tokens_mistral': 467, 'n_tokens_neox': 463, 'n_words': 100}