attributes now have a method to get the JSONObject representation of the attribute