FINERACT-1975: BatchAPI - JSON handler cannot handle null (fix)
This commit is contained in:
@@ -182,6 +182,9 @@ public class ResolutionHelper {
|
||||
} else if (element.isJsonArray()) {
|
||||
final JsonArray jsElementArray = element.getAsJsonArray();
|
||||
value = processJsonArray(jsElementArray, responseCtx);
|
||||
} else if (element.isJsonNull()) {
|
||||
// No further processing of null values
|
||||
value = element;
|
||||
} else {
|
||||
value = resolveDependentVariable(element, responseCtx);
|
||||
}
|
||||
|
||||
+2
-3
@@ -820,9 +820,8 @@ public final class BatchHelper {
|
||||
br.setRelativeUrl(String.format("v1/loans/$.loanId/transactions?command=%s", transactionCommand));
|
||||
br.setMethod("POST");
|
||||
String dateString = date.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||
br.setBody(String.format(
|
||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": %s}",
|
||||
dateString, amount));
|
||||
br.setBody(String.format("{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
||||
+ "\"transactionDate\": \"%s\", \"transactionAmount\": %s, \"note\":null}", dateString, amount));
|
||||
|
||||
return br;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user