Source:
<code>public JsonObject toJson() { JsonObject root = new JsonObject(); String name = mapConfig.getName(); if (!StringUtil.isNullOrEmpty(name)) { root.add("name", name); } String quorumName = mapConfig.getQuorumName(); if (!StringUtil.isNullOrEmpty(quorumName)) { root.add("quorumName", quorumName); } root.add("maxSize", mapConfig.getMaxSizeConfig().getSize()); root.add("maxSizePolicy", mapConfig.getMaxSizeConfig().getMaxSizePolicy().toString()); root.add("evictionPolicy", mapConfig.getEvictionPolicy().name()); root.add("memoryFormat", mapConfig.getInMemoryFormat().toString()); root.add("cacheDeserializedValues", mapConfig.getCacheDeserializedValues().toString()); root.add("metadataPolicy", mapConfig.getMetadataPolicy().toString()); root.add("backupCount", mapConfig.getBackupCount()); root.add("asyncBackupCount", mapConfig.getAsyncBackupCount()); root.add("ttl", mapConfig.getTimeToLiveSeconds()); root.add("maxIdle", mapConfig.getMaxIdleSeconds()); root.add("readBackupData", mapConfig.isReadBackupData()); root.add("statisticsEnabled", mapConfig.isStatisticsEnabled()); root.add("mergePolicy", new MergePolicyConfigDTO(mapConfig.getMergePolicyConfig()).toJson()); <START> root.add("mapStoreConfig", new MapStoreConfigDTO(mapConfig.getMapStoreConfig()).toJson()); <END> NearCacheConfig nearCacheConfig = mapConfig.getNearCacheConfig(); if (nearCacheConfig != null) { root.add("nearCacheConfig", new NearCacheConfigDTO(nearCacheConfig).toJson()); } return root; }</code><technical_language>these? private WanReplicationRef wanReplicationRef; private List<EntryListenerConfig> entryListenerConfigs; private List<MapPartitionLostListenerConfig> partitionLostListenerConfigs; private List<MapIndexConfig> mapIndexConfigs; private List<MapAttributeConfig> mapAttributeConfigs; private List<QueryCacheConfig> queryCacheConfigs; private PartitioningStrategyConfig partitioningStrategyConfig; private HotRestartConfig hotRestartConfig = new HotRestartConfig(); private MerkleTreeConfig merkleTreeConfig = new MerkleTreeConfig(); private EventJournalConfig eventJournalConfig = new EventJournalConfig();</technical_language>

Target:
public JsonObject toJson() { JsonObject root = new JsonObject(); String name = mapConfig.getName(); if (!isNullOrEmpty(name)) { root.add("name", name); } String splitBrainProtectionName = mapConfig.getSplitBrainProtectionName(); if (!isNullOrEmpty(splitBrainProtectionName)) { root.add("splitBrainProtectionName", splitBrainProtectionName); } root.add("maxSize", mapConfig.getMaxSizeConfig().getSize()); root.add("maxSizePolicy", mapConfig.getMaxSizeConfig().getMaxSizePolicy().toString()); root.add("evictionPolicy", mapConfig.getEvictionPolicy().name()); root.add("memoryFormat", mapConfig.getInMemoryFormat().toString()); root.add("cacheDeserializedValues", mapConfig.getCacheDeserializedValues().toString()); root.add("metadataPolicy", mapConfig.getMetadataPolicy().toString()); root.add("backupCount", mapConfig.getBackupCount()); root.add("asyncBackupCount", mapConfig.getAsyncBackupCount()); root.add("ttl", mapConfig.getTimeToLiveSeconds()); root.add("maxIdle", mapConfig.getMaxIdleSeconds()); root.add("readBackupData", mapConfig.isReadBackupData()); root.add("statisticsEnabled", mapConfig.isStatisticsEnabled()); root.add("mergePolicy", new MergePolicyConfigDTO(mapConfig.getMergePolicyConfig()).toJson()); root.add("mapStoreConfig", new MapStoreConfigDTO(mapConfig.getMapStoreConfig()).toJson()); NearCacheConfig nearCacheConfig = mapConfig.getNearCacheConfig(); if (nearCacheConfig != null) { root.add("nearCacheConfig", new NearCacheConfigDTO(nearCacheConfig).toJson()); } return root; }