Package com.structurizr.io.json
Class JsonReader
java.lang.Object
com.structurizr.io.json.JsonReader
- All Implemented Interfaces:
WorkspaceReader
public final class JsonReader extends java.lang.Object implements WorkspaceReader
Reads a workspace definition as JSON.
-
Constructor Summary
Constructors Constructor Description JsonReader() -
Method Summary
Modifier and Type Method Description com.structurizr.Workspaceread(java.io.Reader reader)Reads and parses a workspace definition from a JSON document.voidsetIdGenerator(com.structurizr.model.IdGenerator idGenerator)Sets the ID generator to use when parsing a JSON workspace definition.
-
Constructor Details
-
JsonReader
public JsonReader()
-
-
Method Details
-
setIdGenerator
public void setIdGenerator(com.structurizr.model.IdGenerator idGenerator)Sets the ID generator to use when parsing a JSON workspace definition.- Parameters:
idGenerator- an IdGenerator implementation
-
read
Reads and parses a workspace definition from a JSON document.- Specified by:
readin interfaceWorkspaceReader- Parameters:
reader- a Reader on top of the workspace definition- Returns:
- a Workspace object
- Throws:
WorkspaceReaderException- if something goes wrong
-