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
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
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
public com.structurizr.Workspace read(java.io.Reader reader) throws WorkspaceReaderExceptionReads 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
-
-