Skip to content

Commit 8f76f0f

Browse files
authored
Merge pull request #56 from WeBankBlockchain/json_bug_fix
Json bug fix
2 parents 82e32a9 + 56a84f6 commit 8f76f0f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

WeBankBlockchain-Data-Export-sdk/WeBankBlockchain-Data-Export-common/src/main/java/com/webank/blockchain/data/export/common/client/RpcHttpClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.googlecode.jsonrpc4j.JsonRpcHttpClient;
55
import com.webank.blockchain.data.export.common.entity.ChainInfo;
66
import com.webank.blockchain.data.export.common.entity.ExportConstant;
7+
import com.webank.blockchain.data.export.common.tools.JacksonUtils;
78
import lombok.AllArgsConstructor;
89
import lombok.extern.slf4j.Slf4j;
910
import org.fisco.bcos.sdk.client.protocol.model.JsonTransactionResponse;
@@ -16,6 +17,7 @@
1617
import java.math.BigInteger;
1718
import java.net.MalformedURLException;
1819
import java.net.URL;
20+
import java.util.HashMap;
1921

2022
/**
2123
* @author wesleywang
@@ -35,7 +37,7 @@ public class RpcHttpClient implements ChainClient {
3537
public RpcHttpClient() throws MalformedURLException {
3638
ChainInfo chainInfo = ExportConstant.getCurrentContext().getChainInfo();
3739
try {
38-
client = new JsonRpcHttpClient(new URL(chainInfo.getRpcUrl()));
40+
client = new JsonRpcHttpClient(JacksonUtils.objectMapper,new URL(chainInfo.getRpcUrl()), new HashMap<>());
3941
} catch (MalformedURLException e) {
4042
log.error("rpcHttp client build failed , reason : ", e);
4143
throw e;

WeBankBlockchain-Data-Export-sdk/WeBankBlockchain-Data-Export-common/src/main/java/com/webank/blockchain/data/export/common/tools/JacksonUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*/
3737
@Slf4j
3838
public class JacksonUtils {
39-
private static ObjectMapper objectMapper = new ObjectMapper();
39+
public static ObjectMapper objectMapper = new ObjectMapper();
4040

4141
static {
4242
objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);

WeBankBlockchain-Data-Export-sdk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ apply plugin: 'signing'
99
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
1010

1111
group = 'com.webank'
12-
version = "1.7.6"
12+
version = "1.7.7"
1313

1414
allprojects {
1515
repositories {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ allprojects {
2020
}
2121

2222
subprojects{
23-
version = "1.7.6"
23+
version = "1.7.7"
2424
group = 'com.webank'
2525
}
2626

0 commit comments

Comments
 (0)