code: public void write(Service model, OutputStream os) throws IOException {
      objectMapper.writerWithDefaultPrettyPrinter().writeValue(os, model);
    }
docs: Write model to stream.
  @param model Model
  @param os Stream
  @throws IOException