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.void
Export 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:ExportStrategy
Get the extension of the file.- Specified by:
getExtension
in interfaceExportStrategy
- Returns:
- the extension of the file.
-
getContentType
Description copied from interface:ExportStrategy
Get the content type of the file.- Specified by:
getContentType
in interfaceExportStrategy
- Returns:
- the content type of the file.
-
export
Description copied from interface:ExportStrategy
Export object to string.- Specified by:
export
in interfaceExportStrategy
- Parameters:
object
- Object to be exported.- Returns:
- String representation of the object.
-
export
Description copied from interface:ExportStrategy
Export object to file.- Specified by:
export
in interfaceExportStrategy
- Parameters:
object
- Object to be exported.file
- File to be exported.
-