Class JsonExportStrategy
java.lang.Object
dev.rafandoo.cup.object.export.strategies.JsonExportStrategy
- All Implemented Interfaces:
ExportStrategy
JSON export strategy.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExport object to string.voidExport object to file.Get the content type of the file.Get the extension of the file.
-
Constructor Details
-
JsonExportStrategy
public JsonExportStrategy()
-
-
Method Details
-
getExtension
Description copied from interface:ExportStrategyGet the extension of the file.- Specified by:
getExtensionin interfaceExportStrategy- Returns:
- the extension of the file.
-
getContentType
Description copied from interface:ExportStrategyGet the content type of the file.- Specified by:
getContentTypein interfaceExportStrategy- Returns:
- the content type of the file.
-
export
Description copied from interface:ExportStrategyExport object to string.- Specified by:
exportin interfaceExportStrategy- Parameters:
object- Object to be exported.- Returns:
- String representation of the object.
-
export
Description copied from interface:ExportStrategyExport object to file.- Specified by:
exportin interfaceExportStrategy- Parameters:
object- Object to be exported.file- File to be exported.
-