Last active
January 29, 2021 18:22
-
-
Save sethdorris/e770b5e01386e815eb1a4d12af17d3b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gson gson = new Gson(); | |
String jsonOutput = gson.toJson(dataFile); | |
File jsonFile = new File("jsonoutput.json"); | |
try (BufferedWriter br = new BufferedWriter(new FileWriter(jsonFile))) { | |
br.write(jsonOutput); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment