Update variable
This commit is contained in:
parent
5a87ea4e2c
commit
6c8d1936bc
@ -36,8 +36,8 @@ public class JsonUtils {
|
|||||||
|
|
||||||
public static void writeJson(Object object, File file) {
|
public static void writeJson(Object object, File file) {
|
||||||
try(FileWriter fileWriter = new FileWriter(file)) {
|
try(FileWriter fileWriter = new FileWriter(file)) {
|
||||||
String prettyJsonString = JSON.toJson(object);
|
String jsonString = JSON.toJson(object);
|
||||||
fileWriter.write(prettyJsonString);
|
fileWriter.write(jsonString);
|
||||||
fileWriter.close();
|
fileWriter.close();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
System.out.println("Exception thrown while writing the file " + file.getPath());
|
System.out.println("Exception thrown while writing the file " + file.getPath());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user