+ private String decodeJsonVal(String tempJson, JSONObject policyJson) {
+ if (policyJson != null) {
+ for (Object key : policyJson.keySet()) {
+ String keyStr = (String) key;
+ Object keyvalue = policyJson.get(keyStr);
+ String decodedString = keyvalue.toString();//.replace("\"", "");
+ if(!decodedString.equals("true") && !decodedString.equals("false")) {
+ String decodedJson = new String(Base64.getDecoder().decode(decodedString), StandardCharsets.UTF_8).replace("\"", "\\\"");
+ policyJson.put(keyStr, decodedJson);
+ }
+ }
+ tempJson = saveOriginalJsonObject(policyJson, jsonStringValues).toString();
+ }
+ return tempJson;
+ }
+