<commit_before>﻿using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

//Source: http://stackoverflow.com/questions/6288660/net-ensuring-json-keys-are-lowercases

namespace Buzzbox_Common
{
    public class LowercaseJsonSerializer
    {
        private static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
        {
            ContractResolver = new LowercaseContractResolver()
        };

        public static string SerializeObject(object o)
        {
            return JsonConvert.SerializeObject(o, Formatting.Indented, Settings);
        }

        public class LowercaseContractResolver : DefaultContractResolver
        {
            protected override string ResolvePropertyName(string propertyName)
            {
                return propertyName.ToLower();
            }
        }
    }
}<commit_msg>Deserialize PlayerClass as playerClass instead of playerclass.<commit_after>﻿using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

//Source: http://stackoverflow.com/questions/6288660/net-ensuring-json-keys-are-lowercases

namespace Buzzbox_Common
{
    public class LowercaseJsonSerializer
    {
        private static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
        {
            ContractResolver = new LowercaseContractResolver()
        };

        public static string SerializeObject(object o)
        {
            return JsonConvert.SerializeObject(o, Formatting.Indented, Settings);
        }

        public class LowercaseContractResolver : DefaultContractResolver
        {
            protected override string ResolvePropertyName(string propertyName)
            {
                if (propertyName == "PlayerClass")
                    return "playerClass";

                return propertyName.ToLower();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.06764866339334424, 'fraction_numerical': 0.007637752318603383, 'mean_word_length': 2.480075901328273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7551287', 'n_tokens_mistral': 440, 'n_tokens_neox': 423, 'n_words': 93}