Class JsonWriter

java.lang.Object
com.structurizr.io.json.JsonWriter
All Implemented Interfaces:
WorkspaceWriter

public final class JsonWriter extends Object implements WorkspaceWriter
Writes a workspace definition as a JSON string.
  • Constructor Details

    • JsonWriter

      public JsonWriter(boolean indentOutput)
  • Method Details

    • write

      public void write(com.structurizr.Workspace workspace, Writer writer) throws WorkspaceWriterException
      Writes a workspace definition as a JSON string to the specified Writer object.
      Specified by:
      write in interface WorkspaceWriter
      Parameters:
      workspace - the Workspace object to write
      writer - the Writer object to write the workspace to
      Throws:
      WorkspaceWriterException - if something goes wrong