Skip to content

Commit

Permalink
Merge pull request #16 from Tejas-Sangani/kyc_sdk_java_v2
Browse files Browse the repository at this point in the history
modified code for building query string.
  • Loading branch information
Tejas-Sangani committed Nov 28, 2018
2 parents aeb2d56 + 37c5cb5 commit a1af84d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/ost/kyc/lib/OSTKYCRequestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ private static JsonObject buildApiResponse(String jsonString) {

private static ArrayList<HttpParam> buildNestedQuery(ArrayList<HttpParam> params, String paramKeyPrefix, Object paramValObj) {

if (paramValObj instanceof String) {
params.add(new HttpParam(paramKeyPrefix, paramValObj.toString()));
} else if (paramValObj instanceof Map) {
if (paramValObj instanceof Map) {

// sort map.
Map<String, Object> sortedMap = new TreeMap<String, Object>((Map<? extends String, ?>) paramValObj);
Expand All @@ -345,6 +343,8 @@ private static ArrayList<HttpParam> buildNestedQuery(ArrayList<HttpParam> params
String prefix = paramKeyPrefix + "[]";
params = buildNestedQuery(params, prefix, value);
}
} else {
params.add(new HttpParam(paramKeyPrefix, paramValObj.toString()));
}
return params;
}
Expand Down

0 comments on commit a1af84d

Please sign in to comment.