mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
switched from config to Gson for better json support as the validation config will be editable in the application directly
This commit is contained in:
@@ -26,8 +26,7 @@
|
||||
|
||||
package ninja.javafx.smartcsv.validation;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import ninja.javafx.smartcsv.FileReader;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -40,11 +39,11 @@ import java.io.IOException;
|
||||
@Service
|
||||
public class ValidationFileReader implements FileReader {
|
||||
|
||||
private Config config;
|
||||
private ValidationConfiguration config;
|
||||
|
||||
@Override
|
||||
public void read(File file) throws IOException {
|
||||
config = ConfigFactory.parseFile(file);
|
||||
config = new GsonBuilder().create().fromJson(new java.io.FileReader(file), ValidationConfiguration.class);
|
||||
}
|
||||
|
||||
public Validator getValidator() {
|
||||
|
||||
Reference in New Issue
Block a user