@@ -0,0 +1,1199 @@
+package com.github.aureliano.evtbridge.converter.helper;%0A%0Aimport java.util.Map;%0A%0Aimport com.github.aureliano.evtbridge.converter.ConfigurationConverter;%0Aimport com.github.aureliano.evtbridge.converter.ConfigurationSourceType;%0Aimport com.github.aureliano.evtbridge.converter.exception.ConfigurationConverterException;%0Aimport com.github.aureliano.evtbridge.core.config.EventCollectorConfiguration;%0Aimport com.github.aureliano.evtbridge.core.helper.DataHelper;%0Aimport com.github.aureliano.evtbridge.core.helper.FileHelper;%0A%0Apublic final class ConversionHelper %7B%0A%0A%09private ConversionHelper() %7B%7D%0A%09%0A%09public static EventCollectorConfiguration loadConfiguration(String path, ConfigurationSourceType type) %7B%0A%09%09switch (type) %7B%0A%09%09%09case YAML: return null;%0A%09%09%09case JSON: return convertFromJson(path);%0A%09%09%09default: throw new ConfigurationConverterException(%22Configuration source type '%22 + type + %22' not supported.%22);%0A%09%09%7D%0A%09%7D%0A%09%0A%09private static EventCollectorConfiguration convertFromJson(String path) %7B%0A%09%09String text = FileHelper.readFile(path);%0A%09%09@SuppressWarnings(%22unchecked%22)%0A%09%09Map%3CString, Object%3E data = DataHelper.jsonStringToObject(text, Map.class);%0A%09%09%0A%09%09return new ConfigurationConverter().convert(data);%0A%09%7D%0A%7D

Create conversion helper with parse json to configuration method.