mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 21:48:22 +02:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ce9ae8edd | |||
| 7c12b7506f | |||
| 6fc62006fa | |||
| fdc4f99fd5 | |||
| e29d60b9b8 | |||
| 0a4e86c160 | |||
| c07dde8e19 | |||
| 9b0e3707b7 | |||
| a1f6c24bae | |||
| c1a671504e | |||
| 7c3f140491 | |||
| 16373a033a | |||
| e9e71b5474 | |||
| 48c657b648 | |||
| 8bd90b47e1 | |||
| 44f36759a6 | |||
|
|
326e4d954b | ||
|
|
96446e4e75 | ||
|
|
5eaf021632 | ||
|
|
ef376d6c61 | ||
|
|
2676b523d3 | ||
|
|
7e34ff8c59 |
@@ -1,7 +1,7 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 2015-2016 Andreas Billmann <andreas.billmann@javafx.ninja>
|
Copyright (c) 2015-2019 Andreas Billmann <andreas.billmann@javafx.ninja>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ even in a "normal" CSV editor. So I decided to write this simple JavaFX applicat
|
|||||||
|
|
||||||
[Wiki & Documentation](https://github.com/frosch95/SmartCSV.fx/wiki)
|
[Wiki & Documentation](https://github.com/frosch95/SmartCSV.fx/wiki)
|
||||||
|
|
||||||
binary distribution of the [latest release (0.8)](https://github.com/frosch95/SmartCSV.fx/releases/download/0.8/SmartCSV.fx-0.8-SNAPSHOT.zip)
|
binary distribution of the [latest release (0.9.1)](https://github.com/frosch95/SmartCSV.fx/releases/download/0.9.1/SmartCSV.fx-0.9.1-SNAPSHOT.zip)
|
||||||
|
|
||||||
## Talks
|
## Talks
|
||||||
[Introduction](http://javafx.ninja/talks/introduction/)
|
[Introduction](http://javafx.ninja/talks/introduction/)
|
||||||
|
|||||||
53
build.gradle
53
build.gradle
@@ -1,38 +1,39 @@
|
|||||||
group 'ninja.javafx'
|
plugins {
|
||||||
version '0.8-SNAPSHOT'
|
id 'idea'
|
||||||
|
id 'java'
|
||||||
apply plugin: 'java'
|
id 'groovy'
|
||||||
apply plugin: 'groovy'
|
id 'application'
|
||||||
apply plugin:'application'
|
id 'org.openjfx.javafxplugin' version '0.0.8'
|
||||||
apply plugin: 'idea'
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
|
||||||
mainClassName = 'ninja.javafx.smartcsv.fx.SmartCSV'
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
javafx {
|
||||||
|
version = "13"
|
||||||
|
modules = [ 'javafx.controls', 'javafx.fxml' ]
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||||
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
|
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
|
||||||
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.0-beta-3'
|
||||||
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.7'
|
compile group: 'org.springframework', name:'spring-context', version: '5.2.0.RELEASE'
|
||||||
compile group: 'org.springframework', name:'spring-context', version: '4.3.1.RELEASE'
|
|
||||||
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.4.0'
|
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.4.0'
|
||||||
compile group: 'commons-validator', name: 'commons-validator', version: '1.5.1'
|
compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
|
||||||
compile group: 'de.jensd', name: 'fontawesomefx-commons', version: '8.12'
|
compile group: 'de.jensd', name: 'fontawesomefx-commons', version: '11.0'
|
||||||
compile group: 'de.jensd', name: 'fontawesomefx-fontawesome', version: '4.6.3'
|
compile group: 'de.jensd', name: 'fontawesomefx-fontawesome', version: '4.7.0-11'
|
||||||
compile group: 'de.jensd', name: 'fontawesomefx-materialdesignfont', version: '1.6.50'
|
compile group: 'de.jensd', name: 'fontawesomefx-materialdesignfont', version: '1.7.22-11'
|
||||||
compile group: 'de.jensd', name: 'fontawesomefx-materialicons', version: '2.2.0'
|
compile group: 'de.jensd', name: 'fontawesomefx-materialicons', version: '2.2.0-11'
|
||||||
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.40.11'
|
compile group: 'org.controlsfx', name: 'controlsfx', version: '11.0.0'
|
||||||
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
|
||||||
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.6.2'
|
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
|
||||||
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.6.2'
|
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
|
||||||
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6.10'
|
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.10.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
group 'ninja.javafx'
|
||||||
gradleVersion = '2.14.1' //version required
|
version '0.9.2-SNAPSHOT'
|
||||||
}
|
mainClassName = 'ninja.javafx.smartcsv.Main'
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
|||||||
#Sat Jul 23 09:35:51 CEST 2016
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
|
||||||
|
|||||||
68
gradlew
vendored
68
gradlew
vendored
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
@@ -6,12 +6,30 @@
|
|||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Attempt to set APP_HOME
|
||||||
DEFAULT_JVM_OPTS=""
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
|
|
||||||
@@ -30,6 +48,7 @@ die ( ) {
|
|||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
CYGWIN* )
|
CYGWIN* )
|
||||||
cygwin=true
|
cygwin=true
|
||||||
@@ -40,26 +59,11 @@ case "`uname`" in
|
|||||||
MINGW* )
|
MINGW* )
|
||||||
msys=true
|
msys=true
|
||||||
;;
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
PRG="$0"
|
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -85,7 +89,7 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
@@ -150,11 +154,19 @@ if $cygwin ; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Escape application args
|
||||||
function splitJvmOpts() {
|
save () {
|
||||||
JVM_OPTS=("$@")
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
}
|
}
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
APP_ARGS=$(save "$@")
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
12
gradlew.bat
vendored
12
gradlew.bat
vendored
@@ -8,14 +8,14 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
@@ -49,7 +49,6 @@ goto fail
|
|||||||
@rem Get command-line arguments, handling Windows variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
@@ -60,11 +59,6 @@ set _SKIP=2
|
|||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|||||||
10
src/main/java/ninja/javafx/smartcsv/Main.java
Normal file
10
src/main/java/ninja/javafx/smartcsv/Main.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package ninja.javafx.smartcsv;
|
||||||
|
|
||||||
|
import ninja.javafx.smartcsv.fx.SmartCSV;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// workaround for module problem
|
||||||
|
SmartCSV.main(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class stores files and there state
|
* This class stores files and their state
|
||||||
* @author abi
|
* @author abi
|
||||||
*/
|
*/
|
||||||
public class FileStorage<E> {
|
public class FileStorage<E> {
|
||||||
@@ -26,7 +26,7 @@ public class FileStorage<E> {
|
|||||||
|
|
||||||
private BooleanProperty fileChanged = new SimpleBooleanProperty(true);
|
private BooleanProperty fileChanged = new SimpleBooleanProperty(true);
|
||||||
private ObjectProperty<File> file = new SimpleObjectProperty<>();
|
private ObjectProperty<File> file = new SimpleObjectProperty<>();
|
||||||
private ObjectProperty<E> content = new SimpleObjectProperty<E>();
|
private ObjectProperty<E> content = new SimpleObjectProperty<>();
|
||||||
|
|
||||||
public boolean isFileChanged() {
|
public boolean isFileChanged() {
|
||||||
return fileChanged.get();
|
return fileChanged.get();
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ import ninja.javafx.smartcsv.fx.FXMLController;
|
|||||||
import ninja.javafx.smartcsv.validation.configuration.*;
|
import ninja.javafx.smartcsv.validation.configuration.*;
|
||||||
import org.fxmisc.richtext.CodeArea;
|
import org.fxmisc.richtext.CodeArea;
|
||||||
import org.fxmisc.richtext.LineNumberFactory;
|
import org.fxmisc.richtext.LineNumberFactory;
|
||||||
import org.fxmisc.richtext.StyleSpans;
|
import org.fxmisc.richtext.model.StyleSpans;
|
||||||
import org.fxmisc.richtext.StyleSpansBuilder;
|
import org.fxmisc.richtext.model.StyleSpansBuilder;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -298,6 +298,7 @@ public class ValidationEditorController extends FXMLController {
|
|||||||
Constraints constraints = config.getConstraints();
|
Constraints constraints = config.getConstraints();
|
||||||
if (constraints == null) {
|
if (constraints == null) {
|
||||||
constraints = new Constraints();
|
constraints = new Constraints();
|
||||||
|
config.setConstraints(constraints);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableNotEmptyRule.isSelected()) {
|
if (enableNotEmptyRule.isSelected()) {
|
||||||
@@ -442,7 +443,7 @@ public class ValidationEditorController extends FXMLController {
|
|||||||
ruleEnabled.setSelected(false);
|
ruleEnabled.setSelected(false);
|
||||||
} else {
|
} else {
|
||||||
ruleEnabled.setSelected(true);
|
ruleEnabled.setSelected(true);
|
||||||
rule.replaceText(0, 0, value);
|
rule.replaceText(0, rule.getLength(), value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package ninja.javafx.smartcsv.validation;
|
package ninja.javafx.smartcsv.validation;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author abi
|
* @author abi
|
||||||
*/
|
*/
|
||||||
@@ -31,6 +33,13 @@ public class ValidationFormatHelper {
|
|||||||
format = format.replace("%j", "DDD");
|
format = format.replace("%j", "DDD");
|
||||||
format = format.replace("%U", "ww");
|
format = format.replace("%U", "ww");
|
||||||
return format;
|
return format;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
new SimpleDateFormat(format);
|
||||||
|
return format;
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return defaultFormat;
|
return defaultFormat;
|
||||||
|
|||||||
@@ -133,6 +133,15 @@ public class Validator {
|
|||||||
validationMap.put(validation.getType(), validation);
|
validationMap.put(validation.getType(), validation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void remove(String column, Validation.Type type) {
|
||||||
|
Map<Validation.Type, Validation> validationMap = columnValidationMap.get(column);
|
||||||
|
if (validationMap == null) {
|
||||||
|
validationMap = new HashMap<>();
|
||||||
|
columnValidationMap.put(column, validationMap);
|
||||||
|
}
|
||||||
|
validationMap.remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
private void clear(String column) {
|
private void clear(String column) {
|
||||||
Map<Validation.Type, Validation> validationMap = columnValidationMap.get(column);
|
Map<Validation.Type, Validation> validationMap = columnValidationMap.get(column);
|
||||||
if (validationMap != null) {
|
if (validationMap != null) {
|
||||||
@@ -172,12 +181,12 @@ public class Validator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (column.getType() == DATE) {
|
if (column.getType() == DATE) {
|
||||||
String format = dateFormat(column.getFormat(), "YYYY-MM-DD");
|
String format = dateFormat(column.getFormat(), "yyyy-MM-dd");
|
||||||
add(column.getName(), new DateValidation(format));
|
add(column.getName(), new DateValidation(format));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (column.getType() == DATETIME) {
|
if (column.getType() == DATETIME) {
|
||||||
String format = dateFormat(column.getFormat(), "YYYY-MM-DDThh:mm:ssZ");
|
String format = dateFormat(column.getFormat(), "yyyy-MM-ddThh:mm:ssZ");
|
||||||
add(column.getName(), new DateValidation(format));
|
add(column.getName(), new DateValidation(format));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,6 +195,10 @@ public class Validator {
|
|||||||
add(column.getName(), new DateValidation(format));
|
add(column.getName(), new DateValidation(format));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (column.getType() == STRING && column.getFormat() == null) {
|
||||||
|
remove(column.getName(), Validation.Type.STRING);
|
||||||
|
} else {
|
||||||
|
|
||||||
if (column.getType() == STRING && column.getFormat().equalsIgnoreCase(EMAIL.getExternalValue())) {
|
if (column.getType() == STRING && column.getFormat().equalsIgnoreCase(EMAIL.getExternalValue())) {
|
||||||
add(column.getName(), new EmailValidation());
|
add(column.getName(), new EmailValidation());
|
||||||
}
|
}
|
||||||
@@ -202,8 +215,6 @@ public class Validator {
|
|||||||
add(column.getName(), new BinaryValidation());
|
add(column.getName(), new BinaryValidation());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (column.getType() == STRING && column.getFormat() == null) {
|
|
||||||
columnValidationMap.get(column).remove(Validation.Type.STRING);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.Hyperlink?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.ScrollPane?>
|
||||||
|
<?import javafx.scene.control.TextArea?>
|
||||||
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
|
<?import javafx.scene.layout.GridPane?>
|
||||||
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="600.0" spacing="4.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
|
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="600.0" spacing="4.0" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Label text="SmartCSV.fx">
|
|
||||||
<font>
|
|
||||||
<Font size="18.0" />
|
|
||||||
</font>
|
|
||||||
<VBox.margin>
|
|
||||||
<Insets top="8.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</Label>
|
|
||||||
<Label text="A simple JavaFX application to load, save and edit a CSV file and provide a JSON configuration for columns " wrapText="true" />
|
|
||||||
<Label text="to check the values in the columns." />
|
|
||||||
<Label text="Thanks for contributions:">
|
<Label text="Thanks for contributions:">
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
@@ -25,6 +22,7 @@
|
|||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<Label text="AOE Takashi (https://github.com/aoetk)" />
|
<Label text="AOE Takashi (https://github.com/aoetk)" />
|
||||||
|
<Label text="Hasan Kara (https://github.com/haisi)" />
|
||||||
<Label text="3rd party software">
|
<Label text="3rd party software">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets top="8.0" />
|
<Insets top="8.0" />
|
||||||
@@ -41,17 +39,17 @@
|
|||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" />
|
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Label text="junit" />
|
<Label text="junit" />
|
||||||
@@ -91,7 +89,7 @@
|
|||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<TextArea editable="false" prefHeight="200.0" prefWidth="200.0" text="Copyright (c) 2015-2016 Andreas Billmann <andreas.billmann@javafx.ninja> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." wrapText="true" />
|
<TextArea editable="false" prefHeight="200.0" prefWidth="200.0" text="Copyright (c) 2015-2019 Andreas Billmann <andreas.billmann@javafx.ninja> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." wrapText="true" />
|
||||||
</children>
|
</children>
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
application.name = SmartCSV.fx
|
application.name = SmartCSV.fx
|
||||||
application.version = 0.8
|
application.version = 0.9.1
|
||||||
|
|
||||||
# fxml views
|
# fxml views
|
||||||
fxml.smartcvs.view = /ninja/javafx/smartcsv/fx/smartcsv.fxml
|
fxml.smartcvs.view = /ninja/javafx/smartcsv/fx/smartcsv.fxml
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class HeaderValidationTest {
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@Before
|
@Before
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
sut = new Validator(config);
|
sut = new Validator(config, new TestColumnValueProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +116,21 @@ public class HeaderValidationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String json(String... headerNames) {
|
public static String json(String... headerNames) {
|
||||||
return "{\"headers\":{\"list\":[" + asList(headerNames).stream().collect(joining(", ")) + "]}}";
|
|
||||||
|
String json = "{ \"fields\": [";
|
||||||
|
|
||||||
|
for (String headerName: headerNames) {
|
||||||
|
json += "{\"name\" : \""+headerName+"\" },";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (headerNames != null && headerNames.length > 0) {
|
||||||
|
json = json.substring(0, json.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
json += "]}";
|
||||||
|
|
||||||
|
|
||||||
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package ninja.javafx.smartcsv.validation;
|
||||||
|
|
||||||
|
import ninja.javafx.smartcsv.fx.table.model.ColumnValueProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author abi
|
||||||
|
*/
|
||||||
|
public class TestColumnValueProvider implements ColumnValueProvider {
|
||||||
|
@Override
|
||||||
|
public String getValue(int row, String column) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getNumberOfRows() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,8 +26,7 @@ public class ValidatorTest {
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// parameters
|
// parameters
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
private ValidationConfiguration config;
|
private String config;
|
||||||
private String column;
|
|
||||||
private String value;
|
private String value;
|
||||||
private Boolean expectedResult;
|
private Boolean expectedResult;
|
||||||
private ValidationMessage expectedError;
|
private ValidationMessage expectedError;
|
||||||
@@ -43,14 +42,10 @@ public class ValidatorTest {
|
|||||||
// parameterized constructor
|
// parameterized constructor
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
public ValidatorTest(String config,
|
public ValidatorTest(String config,
|
||||||
String column,
|
|
||||||
String value,
|
String value,
|
||||||
Boolean expectedResult,
|
Boolean expectedResult,
|
||||||
ValidationMessage expectedError) {
|
ValidationMessage expectedError) {
|
||||||
System.out.println(config);
|
this.config = config;
|
||||||
Gson gson = new GsonBuilder().create();
|
|
||||||
this.config = gson.fromJson(config, ValidationConfiguration.class);
|
|
||||||
this.column = column;
|
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.expectedResult = expectedResult;
|
this.expectedResult = expectedResult;
|
||||||
this.expectedError = expectedError;
|
this.expectedError = expectedError;
|
||||||
@@ -62,7 +57,9 @@ public class ValidatorTest {
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@Before
|
@Before
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
sut = new Validator(config);
|
Gson gson = new GsonBuilder().create();
|
||||||
|
ValidationConfiguration validationConfiguration = gson.fromJson(config, ValidationConfiguration.class);
|
||||||
|
sut = new Validator(validationConfiguration, new TestColumnValueProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -71,10 +68,14 @@ public class ValidatorTest {
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@Test
|
@Test
|
||||||
public void validation() {
|
public void validation() {
|
||||||
System.out.println(column + " " + value + " " + expectedResult + " " + expectedError);
|
System.out.println("===================================================");
|
||||||
|
System.out.println(config);
|
||||||
|
System.out.println(value + " " + expectedResult + " " + expectedError);
|
||||||
|
System.out.println("===================================================\n");
|
||||||
|
|
||||||
|
|
||||||
// execution
|
// execution
|
||||||
ValidationError result = sut.isValid(0, column, value);
|
ValidationError result = sut.isValid(0, "column", value);
|
||||||
|
|
||||||
// assertion
|
// assertion
|
||||||
assertThat(result == null, is(expectedResult));
|
assertThat(result == null, is(expectedResult));
|
||||||
@@ -89,33 +90,49 @@ public class ValidatorTest {
|
|||||||
@Parameterized.Parameters
|
@Parameterized.Parameters
|
||||||
public static Collection validationConfigurations() {
|
public static Collection validationConfigurations() {
|
||||||
return asList(new Object[][] {
|
return asList(new Object[][] {
|
||||||
{ json("column", "not empty", true), "column", "value", true, null },
|
{ constraintsJSON("string", "required", true), "value", true, null },
|
||||||
{ json("column", "not empty", true), "column", "", false, new ValidationMessage("validation.message.not.empty") },
|
{ constraintsJSON("string", "required", true), "", false, new ValidationMessage("validation.message.not.empty") },
|
||||||
{ json("column", "not empty", true), "column", null, false, new ValidationMessage("validation.message.not.empty") },
|
{ constraintsJSON("string", "required", true), null, false, new ValidationMessage("validation.message.not.empty") },
|
||||||
{ json("column", "integer", true), "column", "999", true, null },
|
{ constraintsJSON("integer", null, true), "999", true, null },
|
||||||
{ json("column", "integer", true), "column", "a", false, new ValidationMessage("validation.message.integer") },
|
{ constraintsJSON("integer", null, true), "a", false, new ValidationMessage("validation.message.integer") },
|
||||||
{ json("column", "double", true), "column", "999", true, null },
|
{ constraintsJSON("number", null, true), "999", true, null },
|
||||||
{ json("column", "double", true), "column", "999.000", true, null },
|
{ constraintsJSON("number", null, true), "999.000", true, null },
|
||||||
{ json("column", "double", true), "column", "a", false, new ValidationMessage("validation.message.double") },
|
{ constraintsJSON("number", null, true), "a", false, new ValidationMessage("validation.message.double") },
|
||||||
{ json("column", "minlength", 2), "column", "12", true, null },
|
{ constraintsJSON("string", "minLength", 2), "12", true, null },
|
||||||
{ json("column", "minlength", 2), "column", "1", false, new ValidationMessage("validation.message.min.length", "2") },
|
{ constraintsJSON("string", "minLength", 2), "1", false, new ValidationMessage("validation.message.min.length", "2") },
|
||||||
{ json("column", "maxlength", 2), "column", "12", true, null },
|
{ constraintsJSON("string", "maxLength", 2), "12", true, null },
|
||||||
{ json("column", "maxlength", 2), "column", "123", false, new ValidationMessage("validation.message.max.length", "2") },
|
{ constraintsJSON("string", "maxLength", 2), "123", false, new ValidationMessage("validation.message.max.length", "2") },
|
||||||
{ json("column", "date", "yyyyMMdd"), "column", "20151127", true, null },
|
{ constraintsJSON("string", "pattern", "[a-z]*"), "abc", true, null },
|
||||||
{ json("column", "date", "yyyyMMdd"), "column", "27.11.2015", false, new ValidationMessage("validation.message.date.format", "yyyyMMdd") },
|
{ constraintsJSON("string", "pattern", "[a-z]*"), "abcA", false, new ValidationMessage("validation.message.regexp", "[a-z]*") },
|
||||||
{ json("column", "alphanumeric", true), "column", "abcABC123", true, null },
|
{ constraintsJSON("string", "enum", asList("a","b","c","d","e")), "c", true, null },
|
||||||
{ json("column", "alphanumeric", true), "column", "-abcABC123", false, new ValidationMessage("validation.message.alphanumeric") },
|
{ constraintsJSON("string", "enum", asList("a","b","c","d","e")), "f", false, new ValidationMessage("validation.message.value.of", "f", "a, b, c, d, e") },
|
||||||
{ json("column", "regexp", "[a-z]*"), "column", "abc", true, null },
|
|
||||||
{ json("column", "regexp", "[a-z]*"), "column", "abcA", false, new ValidationMessage("validation.message.regexp", "[a-z]*") },
|
{ formatJSON("string", null), "some string", true, null },
|
||||||
{ json("column", "groovy", "value.contains('a')? 'true' : 'no a inside'"), "column", "abcdef", true, null },
|
{ formatJSON("string", "email"), "test@javafx.ninja", true, null },
|
||||||
{ json("column", "groovy", "value.contains('a')? 'true' : 'no a inside'"), "column", "bcdefg", false, new ValidationMessage("no a inside") },
|
{ formatJSON("string", "email"), "wrong email", false, new ValidationMessage("validation.message.email") },
|
||||||
{ json("column", "value of", asList("a","b","c","d","e")), "column", "c", true, null },
|
{ formatJSON("string", "uri"), "http://www.javafx.ninja", true, null },
|
||||||
{ json("column", "value of", asList("a","b","c","d","e")), "column", "f", false, new ValidationMessage("validation.message.value.of", "f", "a, b, c, d, e") },
|
{ formatJSON("string", "uri"), "!$%&/()", false, new ValidationMessage("validation.message.uri") },
|
||||||
|
{ formatJSON("string", "binary"), "dGVzdA==", true, null },
|
||||||
|
{ formatJSON("string", "binary"), "no binary", false, new ValidationMessage("validation.message.binary") },
|
||||||
|
{ formatJSON("string", "uuid"), "6ba7b810-9dad-11d1-80b4-00c04fd430c8", true, null },
|
||||||
|
{ formatJSON("string", "uuid"), "no uuid", false, new ValidationMessage("validation.message.uuid") },
|
||||||
|
{ formatJSON("date", null), "2015-11-27", true, null },
|
||||||
|
{ formatJSON("date", null), "27.11.2015", false, new ValidationMessage("validation.message.date.format", "yyyy-MM-dd") },
|
||||||
|
{ formatJSON("date", "yyyyMMdd"), "20151127", true, null },
|
||||||
|
{ formatJSON("date", "yyyyMMdd"), "27.11.2015", false, new ValidationMessage("validation.message.date.format", "yyyyMMdd") },
|
||||||
|
|
||||||
|
|
||||||
|
{ customAttributeJSON( "groovy", "value.contains('a')? 'true' : 'no a inside'"), "abcdef", true, null },
|
||||||
|
{ customAttributeJSON( "groovy", "value.contains('a')? 'true' : 'no a inside'"), "bcdefg", false, new ValidationMessage("no a inside") },
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String json(String column, String rule, Object value) {
|
public static String constraintsJSON(String type, String constraint, Object value) {
|
||||||
String json = "{\"headers\": { \"list\": [\""+column+"\"]},\"columns\":{\"" + column + "\":{\"" + rule + "\":";
|
String json = "{\"fields\": [ { \"name\": \"column\", \"type\" : \"" + type +"\"";
|
||||||
|
|
||||||
|
if (constraint != null) {
|
||||||
|
json += ", \"constraints\": { \"" + constraint + "\":";
|
||||||
if (value instanceof String) {
|
if (value instanceof String) {
|
||||||
json += "\"" + value + "\"";
|
json += "\"" + value + "\"";
|
||||||
} else if (value instanceof List) {
|
} else if (value instanceof List) {
|
||||||
@@ -124,7 +141,29 @@ public class ValidatorTest {
|
|||||||
} else {
|
} else {
|
||||||
json += value;
|
json += value;
|
||||||
}
|
}
|
||||||
json += "}}}";
|
json += "}";
|
||||||
|
}
|
||||||
|
json += "}]}";
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String formatJSON(String type, String format) {
|
||||||
|
String json = "{\"fields\": [ { \"name\": \"column\", \"type\" : \"" + type +"\"";
|
||||||
|
|
||||||
|
if (format != null) {
|
||||||
|
json += ", \"format\": \"" + format + "\"";
|
||||||
|
}
|
||||||
|
json += "}]}";
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String customAttributeJSON(String attribute, String value) {
|
||||||
|
String json = "{\"fields\": [ { \"name\": \"column\", \"type\" : \"string\"";
|
||||||
|
|
||||||
|
if (attribute != null) {
|
||||||
|
json += ", \""+attribute+"\": \"" + value + "\"";
|
||||||
|
}
|
||||||
|
json += "}]}";
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user