public static byte[] Serialize(object obj)
        {
            if (obj == null)
            {
                return(new byte[0]);
            }
            Type type = obj.GetType();

            if (type.IsEnum)
            {
                return(BloxSerializer.GetBytes((int)obj));
            }
            if (type.IsArray)
            {
                return(BloxSerializer.SerializeArray(obj));
            }
            if (type.IsGenericType)
            {
                if (type.GetGenericTypeDefinition() == typeof(List <>))
                {
                    return(BloxSerializer.SerializeList(obj));
                }
                return(new byte[0]);
            }
            if (BloxSerializer.writers.ContainsKey(type))
            {
                return(BloxSerializer.writers[type](obj));
            }
            return(new byte[0]);
        }