Skip to content

Commit

Permalink
Fix R2 DataMap conversion from nested objects in a json string (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxcware committed Jun 26, 2017
1 parent b7756a9 commit 58a1b6c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -96,8 +96,8 @@ protected int addPayload(RestRequestBuilder builder, String payload) {
}

builder.setHeader(RestConstants.HEADER_CONTENT_TYPE, RestConstants.HEADER_VALUE_APPLICATION_JSON);
DataMap data = new DataMap(HttpUtils.toMap(payload));
try {
DataMap data = JACKSON_DATA_CODEC.stringToMap(payload);
byte[] bytes = JACKSON_DATA_CODEC.mapToBytes(data);
builder.setEntity(bytes);
return bytes.length;
Expand Down

0 comments on commit 58a1b6c

Please sign in to comment.