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 Summary
Constructors Constructor Description AbstractJsonFile() -
Method Summary
Modifier and Type Method Description protected abstract org.json.simple.JSONObjectgetJsonObject()voidwriteToFile(File jsonFile)
-
Constructor Details
-
AbstractJsonFile
public AbstractJsonFile()
-
-
Method Details
-
getJsonObject
protected abstract org.json.simple.JSONObject getJsonObject()- Returns:
- the JsonObject to be written
-
writeToFile
- Parameters:
jsonFile- File to write JSON data to- Throws:
IOException
-