Class JsonWriter

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

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

    Constructors 
    Constructor Description
    JsonWriter​(boolean indentOutput)  
  • Method Summary

    Modifier and Type Method Description
    void write​(com.structurizr.Workspace workspace, java.io.Writer writer)
    Writes a workspace definition as a JSON string to the specified Writer object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonWriter

      public JsonWriter​(boolean indentOutput)
  • Method Details

    • write

      public void write​(com.structurizr.Workspace workspace, java.io.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