Class LocalCampaignSerializer


  • public class LocalCampaignSerializer
    extends java.lang.Object
    • Constructor Detail

      • LocalCampaignSerializer

        public LocalCampaignSerializer()
    • Method Detail

      • serialize

        public JSONObject serialize​(LocalCampaign campaign)
                             throws JSONException
        Serialize a local campaign into a JSONObject
        Parameters:
        campaign - campaign to serialize
        Returns:
        the json object of the serialized campaign
        Throws:
        JSONException - parsing exception
      • serializeList

        public JSONArray serializeList​(java.util.List<LocalCampaign> campaigns)
                                throws JSONException
        Serialize a list of local campaign into a JSONArray
        Parameters:
        campaigns - campaigns to serialize
        Returns:
        json array of the serialized campaigns
        Throws:
        JSONException - parsing exception