code: public void writeJSON(JSONValue jc, JSONWriter jb, boolean writeClass)
              throws IOException {
          String key;
          Object value;
          jb.objectBegin();
          for (Map.Entry<String, Object> entry : objectMap.entrySet()) {
              key = entry.getKey();
              jb.objectItem(key);
              value = entry.getValue();
              if (value == null)
                  jb.valueNull();
              else
                  jc.writeValue(value, jb, writeClass);
          }
          jb.objectEnd();
      }
docs: write json.
  
  @param jc json converter.
  @param jb json builder.