Class JsonExportStrategy

java.lang.Object
dev.rafandoo.cup.object.export.strategies.JsonExportStrategy
All Implemented Interfaces:
ExportStrategy

public class JsonExportStrategy extends Object implements ExportStrategy
JSON export strategy.
See Also:
  • Constructor Details

    • JsonExportStrategy

      public JsonExportStrategy()
  • Method Details

    • getExtension

      public String getExtension()
      Description copied from interface: ExportStrategy
      Get the extension of the file.
      Specified by:
      getExtension in interface ExportStrategy
      Returns:
      the extension of the file.
    • getContentType

      public String getContentType()
      Description copied from interface: ExportStrategy
      Get the content type of the file.
      Specified by:
      getContentType in interface ExportStrategy
      Returns:
      the content type of the file.
    • export

      public String export(Object object)
      Description copied from interface: ExportStrategy
      Export object to string.
      Specified by:
      export in interface ExportStrategy
      Parameters:
      object - Object to be exported.
      Returns:
      String representation of the object.
    • export

      public void export(Object object, File file)
      Description copied from interface: ExportStrategy
      Export object to file.
      Specified by:
      export in interface ExportStrategy
      Parameters:
      object - Object to be exported.
      file - File to be exported.