Package com.structurizr.io.json
Class JsonReader
java.lang.Object
com.structurizr.io.json.JsonReader
- All Implemented Interfaces:
WorkspaceReader
Reads a workspace definition as JSON.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.structurizr.Workspace
Reads and parses a workspace definition from a JSON document.void
setIdGenerator
(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:
read
in interfaceWorkspaceReader
- Parameters:
reader
- a Reader on top of the workspace definition- Returns:
- a Workspace object
- Throws:
WorkspaceReaderException
- if something goes wrong
-