code: public void dumpJson(final PrintWriter out) {
          out.append("{");
          visitVariables(new Visitor() {
              int count = 0;
  
              public void visit(Variable var) {
                  if (count++ > 0) { out.append(", "); }
                  out.append(var.getName()).append("='").append(String.valueOf(var.getValue())).append("'");
              }
          });
          out.append("}");
      }
docs: Write all variables as a JSON object. Will not escape names or values. All values are
  written as Strings.
  @param out writer