<commit_before>﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using Microsoft.EntityFrameworkCore.Metadata;

namespace FileContextCore.Serializer
{
    static class SerializerHelper
    {
        public static object Deserialize(this string input, Type type)
        {
            if (String.IsNullOrEmpty(input))
                return type.GetDefaultValue();

            if (type == typeof(TimeSpan))
                return TimeSpan.Parse(input, CultureInfo.InvariantCulture);
            else if (type == typeof(Guid))
                return Guid.Parse(input);
            else if (type.IsArray)
            {
                Type arrType = type.GetElementType();<commit_msg>Update SerializerHelper.cs<commit_after>﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using Microsoft.EntityFrameworkCore.Metadata;

namespace FileContextCore.Serializer
{
    static class SerializerHelper
    {
        public static object Deserialize(this string input, Type type)
        {
            if (String.IsNullOrEmpty(input))
                return type.GetDefaultValue();

            if (type == typeof(TimeSpan))
                return TimeSpan.Parse(input, CultureInfo.InvariantCulture);
            else if (type == typeof(Guid)
		    || Nullable.GetUnderlyingType(type) == typeof(Guid))
                return Guid.Parse(input);
            else if (type.IsArray)
            {
                Type arrType = type.GetElementType();
{'fraction_non_alphanumeric': 0.08517887563884156, 'fraction_numerical': 0.0, 'mean_word_length': 2.781115879828326, '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': '925469', 'n_tokens_mistral': 444, 'n_tokens_neox': 433, 'n_words': 104}