Example #1
0
        public static void ProcessCSVs(DirectoryWrapper csvDir, DirectoryWrapper customCsvDir, DirectoryWrapper jsonDir)
        {
            ProccessRegularCSVs(csvDir, jsonDir);

            csvDir.GetChildFile("pokemon_moves.csv");

            FileWrapper pokemonMovesFile = csvDir.GetChildFile("pokemon_moves.csv");
        }
Example #2
0
        public static void ProccessRegularCSVs(DirectoryWrapper csvDir, DirectoryWrapper jsonDir)
        {
            Dictionary <string, JObject> processedCsv = CsvToJsonHelper.ProcessCSVDirectory(csvDir, jsonDir);

            foreach (KeyValuePair <string, JObject> keyValue in processedCsv)
            {
                string  tableName = keyValue.Key;
                JObject tableJson = keyValue.Value;

                FileWrapper jsonFile = csvDir.GetChildFile(tableName + ".json");

                CsvToJsonHelper.WriteJson(jsonFile.FullName, tableJson);
            }
        }