code: public JSONObject getJson() throws JSONException {
          JSONObject json = create();
          json.put("type", type);
          json.put("category", getCategory());
          if (label != null && !label.isEmpty())
              json.put("label", label);
          if (displaySequence != null && displaySequence > 0)
              json.put("sequence", displaySequence);
          if (display != null)
              json.put("display", display.toString());
          return json;
      }
docs: Serialized as an object, so name is not included.