writeOne method

void writeOne(
  1. dynamic model,
  2. String text
)

Emits a single model as JSON, or text when not in JSON mode.

Implementation

void writeOne(dynamic model, String text) {
  if (jsonOutput) {
    writeJson((model as dynamic).toJson());
  } else {
    out.writeln(text);
  }
}