src/main/java/org/edgegallery/appstore/infrastructure/util/AppUtil.java
public void updateJsonFileServer(SwImgDesc imageDesc, List<SwImgDesc> imgDecsLists, String fileParent,
        String newPathName) {
        int index = imgDecsLists.indexOf(imageDesc);
        imageDesc.setSwImage(newPathName);
        imgDecsLists.set(index, imageDesc);
        String jsonFile = fileParent + File.separator + JSON_EXTENSION;
        File swImageDesc = new File(jsonFile);
        writeFile(swImageDesc, new Gson().toJson(imgDecsLists));
    }
/**
     * update json file.
     *
     * @param imageDesc imageDesc.
     * @param imgDecsLists imgDecsLists.
     * @param fileParent fileParent.
     * @param newPathName newPathName.
     */
update json file.
@param imageDesc imageDesc.
update json file . @param imageDesc imageDesc .
public void updateJsonFileServer(SwImgDesc imageDesc, List<SwImgDesc> imgDecsLists, String fileParent,
        String newPathName) {
        int index = imgDecsLists.indexOf(imageDesc);
        imageDesc.setSwImage(newPathName);
        imgDecsLists.set(index, imageDesc);
        String jsonFile = fileParent + File.separator + JSON_EXTENSION;
        File swImageDesc = new File(jsonFile);
        writeFile(swImageDesc, new Gson().toJson(imgDecsLists));
    }
public void updateJsonFileServer ( SwImgDesc imageDesc , List < SwImgDesc > imgDecsLists , String fileParent , String newPathName ) { int index = imgDecsLists . indexOf ( imageDesc ) ; imageDesc . setSwImage ( newPathName ) ; imgDecsLists . set ( index , imageDesc ) ; String jsonFile = fileParent + File . separator + JSON_EXTENSION ; File swImageDesc = new File ( jsonFile ) ; writeFile ( swImageDesc , new Gson ( ) . toJson ( imgDecsLists ) ) ; }
update json file.
update json file .