package cn.com.ctop.toutiao.modules.tool.util;

import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAudiencePackage;
import com.alibaba.fastjson.JSONObject;

public class JsonStringToJsonObject {

    public static ByteDanceAudiencePackage toAudiencePackage(ByteDanceAudiencePackage byteDanceAudiencePackage) {
        if (byteDanceAudiencePackage.getRetargetingTags() != null) {
            byteDanceAudiencePackage.setRetargetingTags(JSONObject.parse((String) byteDanceAudiencePackage.getRetargetingTags()));
        }
        if (byteDanceAudiencePackage.getRetargetingTagsExclude() != null) {
            byteDanceAudiencePackage.setRetargetingTagsExclude(JSONObject.parse((String) byteDanceAudiencePackage.getRetargetingTagsExclude()));
        }
        if (byteDanceAudiencePackage.getAge() != null) {
            byteDanceAudiencePackage.setAge(JSONObject.parse((String) byteDanceAudiencePackage.getAge()));
        }
        if (byteDanceAudiencePackage.getCarrier() != null) {
            byteDanceAudiencePackage.setCarrier(JSONObject.parse((String) byteDanceAudiencePackage.getCarrier()));
        }
        if (byteDanceAudiencePackage.getAc() != null) {
            byteDanceAudiencePackage.setAc(JSONObject.parse((String) byteDanceAudiencePackage.getAc()));
        }
        if (byteDanceAudiencePackage.getDeviceBrand() != null) {
            byteDanceAudiencePackage.setDeviceBrand(JSONObject.parse((String) byteDanceAudiencePackage.getDeviceBrand()));
        }
        if (byteDanceAudiencePackage.getArticleCategory() != null) {
            byteDanceAudiencePackage.setArticleCategory(JSONObject.parse((String) byteDanceAudiencePackage.getArticleCategory()));
        }
        if (byteDanceAudiencePackage.getActivateType() != null) {
            byteDanceAudiencePackage.setActivateType(JSONObject.parse((String) byteDanceAudiencePackage.getActivateType()));
        }
        if (byteDanceAudiencePackage.getPlatform() != null) {
            byteDanceAudiencePackage.setPlatform(JSONObject.parse((String) byteDanceAudiencePackage.getPlatform()));
        }
        if (byteDanceAudiencePackage.getAutoExtendTargets() != null) {
            byteDanceAudiencePackage.setAutoExtendTargets(JSONObject.parse((String) byteDanceAudiencePackage.getAutoExtendTargets()));
        }
        if (byteDanceAudiencePackage.getRetargetingTags() != null) {
            byteDanceAudiencePackage.setRetargetingTags(JSONObject.parse((String) byteDanceAudiencePackage.getRetargetingTags()));
        }
        if (byteDanceAudiencePackage.getActionScene() != null) {
            byteDanceAudiencePackage.setActionScene(JSONObject.parse((String) byteDanceAudiencePackage.getActionScene()));
        }
        if (byteDanceAudiencePackage.getActionCategories() != null) {
            byteDanceAudiencePackage.setActionCategories(JSONObject.parse((String) byteDanceAudiencePackage.getActionCategories()));
        }
        if (byteDanceAudiencePackage.getActionWords() != null) {
            byteDanceAudiencePackage.setActionWords(JSONObject.parse((String) byteDanceAudiencePackage.getActionWords()));
        }
        if (byteDanceAudiencePackage.getLaunchPrice() != null) {
            byteDanceAudiencePackage.setLaunchPrice(JSONObject.parse((String) byteDanceAudiencePackage.getLaunchPrice()));
        }
        if (byteDanceAudiencePackage.getInterestCategories() != null) {
            byteDanceAudiencePackage.setInterestCategories(JSONObject.parse((String) byteDanceAudiencePackage.getInterestCategories()));
        }
        if (byteDanceAudiencePackage.getCity() != null) {
            byteDanceAudiencePackage.setCity(JSONObject.parse((String) byteDanceAudiencePackage.getCity()));
        }
        if (byteDanceAudiencePackage.getBusinessIds() != null) {
            byteDanceAudiencePackage.setBusinessIds(JSONObject.parse((String) byteDanceAudiencePackage.getBusinessIds()));
        }
        if (byteDanceAudiencePackage.getGeolocation() != null) {
            byteDanceAudiencePackage.setGeolocation(JSONObject.parse((String) byteDanceAudiencePackage.getGeolocation()));
        }
        if (byteDanceAudiencePackage.getAwemeFansNumbers() != null) {
            byteDanceAudiencePackage.setAwemeFansNumbers(JSONObject.parse((String) byteDanceAudiencePackage.getAwemeFansNumbers()));
        }
        if (byteDanceAudiencePackage.getAwemeFanAccounts() != null) {
            byteDanceAudiencePackage.setAwemeFanAccounts(JSONObject.parse((String) byteDanceAudiencePackage.getAwemeFanAccounts()));
        }
        if (byteDanceAudiencePackage.getAwemeFanCategories() != null) {
            byteDanceAudiencePackage.setAwemeFanCategories(JSONObject.parse((String) byteDanceAudiencePackage.getAwemeFanCategories()));
        }
        if (byteDanceAudiencePackage.getAwemeFanBehaviors() != null) {
            byteDanceAudiencePackage.setAwemeFanBehaviors(JSONObject.parse((String) byteDanceAudiencePackage.getAwemeFanBehaviors()));
        }
        return byteDanceAudiencePackage;
    }
}
