forked from Qortal/qortal
Fixed bug in JSON validation.
This commit is contained in:
parent
d6ab9eb066
commit
83b0ce53e6
@ -8,6 +8,7 @@ import org.qortal.utils.FilesystemUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
@ -93,7 +94,8 @@ public enum Service {
|
||||
}
|
||||
|
||||
// Require valid JSON
|
||||
String json = Files.readString(path);
|
||||
byte[] data = FilesystemUtils.getSingleFileContents(path);
|
||||
String json = new String(data, StandardCharsets.UTF_8);
|
||||
try {
|
||||
objectMapper.readTree(json);
|
||||
return ValidationResult.OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user