getOutput method

String getOutput(
  1. OutputFormat format
)

Returns the string representation of the model depending on the OutputFormat.

Implementation

String getOutput(OutputFormat format) {
  switch (format) {
    case OutputFormat.dot:
      return toString();
    case OutputFormat.json:
      return _prettyJson(toJson());
  }
}