code: public static void printWorkspaceAsJson(Workspace workspace) {
          if (workspace == null) {
              throw new IllegalArgumentException("A workspace must be provided.");
          }
  
          try {
              System.out.println(toJson(workspace, true));
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
docs: Prints a workspace as JSON to stdout - useful for debugging purposes.
  
  @param workspace     the workspace to print