/**
  * Returns a JSON representation of the object. This method is the counterpart to the
  * PropertyGroup(String) constructor.
  *
  * @return a JSON object
  */
 @Override
 public JSONObject toJson() {
   JSONObject json = super.toJson();
   List<JSONValue> jsonProperties = new ArrayList<JSONValue>();
   for (JSONMetaDataObject property : properties) {
     jsonProperties.add(property.toJson());
   }
   json.put(PROPERTIES, JsonUtil.buildArray(jsonProperties));
   return json;
 }