File tree 2 files changed +6
-2
lines changed
src/main/java/com/meituan/lyrebird/client
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
<groupId >com.github.meituan-dianping.lyrebird.sdk</groupId >
7
7
<artifactId >lyrebird-java-client</artifactId >
8
- <version >1.1.2 </version >
8
+ <version >1.1.3 </version >
9
9
10
10
<name >lyrebird-java-client</name >
11
11
<url >https://github.com/Meituan-Dianping/lyrebird-java-client</url >
Original file line number Diff line number Diff line change 1
1
package com .meituan .lyrebird .client ;
2
2
3
+ import com .fasterxml .jackson .databind .DeserializationFeature ;
4
+ import com .fasterxml .jackson .databind .ObjectMapper ;
3
5
import com .meituan .lyrebird .client .api .bandwidth .Bandwidth ;
4
6
import com .meituan .lyrebird .client .api .bandwidth .BandwidthTemplate ;
5
7
import com .meituan .lyrebird .client .api .bandwidth .SpeedLimit ;
@@ -19,10 +21,12 @@ public class LyrebirdClient {
19
21
private Socket socket ;
20
22
21
23
public LyrebirdClient (String lyrebirdRemoteAddress ) {
24
+ ObjectMapper mapper = new ObjectMapper ();
25
+ mapper .enable (DeserializationFeature .ACCEPT_EMPTY_STRING_AS_NULL_OBJECT );
22
26
Retrofit retrofit = new Retrofit
23
27
.Builder ()
24
28
.baseUrl (lyrebirdRemoteAddress )
25
- .addConverterFactory (JacksonConverterFactory .create ())
29
+ .addConverterFactory (JacksonConverterFactory .create (mapper ))
26
30
.build ();
27
31
lyrebirdService = retrofit .create (LyrebirdService .class );
28
32
}
You can’t perform that action at this time.
0 commit comments