private void parseProperties(final JSONObject json) {
    JSONArray jsonProperties = JsonUtil.getArray(json, PROPERTIES);

    if (jsonProperties != null) {
      for (int i = 0, len = jsonProperties.size(); i < len; i++) {
        JSONObject jsonProperty = JsonUtil.getObjectAt(jsonProperties, i);

        addProperty(new Property(jsonProperty));
      }
    }
  }
 /**
  * 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;
 }