java.lang.Object
com.github.freddyyj.randomtrainsimworld.util.JsonUtils

public class JsonUtils
extends Object
utilities related with Json
Version:
0.2.0
Author:
FreddyYJ_
  • Constructor Details

  • Method Details

    • write

      public static void write​(com.google.gson.JsonObject object, File targetFile) throws IOException
      write JsonObject to file.
      Parameters:
      object - JsonObject that want to write
      targetFile - target file
      Throws:
      IOException - If output error occurred
    • write

      public static void write​(com.google.gson.JsonArray object, File targetFile) throws IOException
      write JsonArray to file.
      Parameters:
      object - JsonArray that want to write
      targetFile - target file
      Throws:
      IOException - If output error occurred