# -*- coding: utf-8 -*-
"""
    serializer.py
    load file type.
        json
        ini
"""
import json
import configparser

def load_json(filename, encoding='utf-8-sig'):
    """
        filed load json data
        @params filename load path.
                encoding file encoding
        @return json data
    """
    json_data = dict()
    with open(filename, encoding=encoding) as file:
        json_data = json.load(file)
    return json_data

def load_ini(filename, encoding='utf-8-sig'):
    """
        load configure.
        @params filename load path.
                encoding file encoding.
        @return ini data
    """
    config = configparser.ConfigParser()
    with open(filename, 'r', encoding=encoding) as file:
        config.read_file(file)
    return config

@@ -119,16 +119,27 @@
 igparser
+%0Aimport csv
 %0A%0Adef lo
@@ -199,14 +199,8 @@
     
-filed 
 load
@@ -301,21 +301,16 @@
 @return 
-json 
 data%0A   
@@ -352,32 +352,37 @@
 h open(filename,
+ 'r',
  encoding=encodi
@@ -523,17 +523,16 @@
 oad 
-configure
+ini data
 .%0A  
@@ -621,20 +621,16 @@
 @return 
-ini 
 data%0A   
@@ -759,24 +759,24 @@
 _file(file)%0A
-
     return c
@@ -781,8 +781,411 @@
  config%0A
+%0Adef load_csv(filename, encoding='utf-8-sig'):%0A    %22%22%22%0A        load csv data.%0A        @params filename load path.%0A                encoding file encoding.%0A        @return data%0A    %22%22%22%0A    csv_data = %5B%5D%0A    with open(filename, 'r', encoding=encoding) as file:%0A        reader = csv.reader(file)%0A        #header = next(reader)%0A        for row in reader:%0A            csv_data.append(row)%0A    return csv_data%0A

add serializer load_csv