Package org.spdx.html

Class AbstractJsonFile

java.lang.Object
org.spdx.html.AbstractJsonFile
Direct Known Subclasses:
ExceptionTOCJSONFile, LicenseExceptionJSONFile, LicenseJSONFile, LicenseTOCJSONFile

public abstract class AbstractJsonFile
extends Object
Supports writing files in JSON format Implementation classes need to implement the getJsonObject method to provide the JSON object to be written
Author:
Gary O'Nell
  • Constructor Details

  • Method Details

    • getJsonObject

      protected abstract org.json.simple.JSONObject getJsonObject()
      Returns:
      the JsonObject to be written
    • writeToFile

      public void writeToFile​(File jsonFile) throws IOException
      Parameters:
      jsonFile - File to write JSON data to
      Throws:
      IOException