Package com.structurizr.io.json
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.
-
Constructor Details
-
JsonWriter
public JsonWriter(boolean indentOutput)
-
-
Method Details
-
write
public void write(com.structurizr.Workspace workspace, java.io.Writer writer) throws WorkspaceWriterExceptionWrites a workspace definition as a JSON string to the specified Writer object.- Specified by:
write
in interfaceWorkspaceWriter
- Parameters:
workspace
- the Workspace object to writewriter
- the Writer object to write the workspace to- Throws:
WorkspaceWriterException
- if something goes wrong
-