File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/main/java/com/exceptionless/exceptionlessclient/utils Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 34
34
<artifactId >slf4j-api</artifactId >
35
35
<version >1.7.30</version >
36
36
</dependency >
37
+ <dependency >
38
+ <groupId >com.fasterxml.jackson.datatype</groupId >
39
+ <artifactId >jackson-datatype-jsr310</artifactId >
40
+ <version >2.10.0</version >
41
+ </dependency >
37
42
<!-- Test Dependencies-->
38
43
<dependency >
39
44
<groupId >org.junit.jupiter</groupId >
Original file line number Diff line number Diff line change 1
1
package com .exceptionless .exceptionlessclient .utils ;
2
2
3
3
import com .fasterxml .jackson .databind .ObjectMapper ;
4
+ import com .fasterxml .jackson .databind .SerializationFeature ;
5
+ import com .fasterxml .jackson .datatype .jsr310 .JavaTimeModule ;
4
6
import org .slf4j .Logger ;
5
7
import org .slf4j .LoggerFactory ;
6
8
9
11
import java .util .*;
10
12
11
13
public final class Utils {
12
- public static final ObjectMapper JSON_MAPPER = new ObjectMapper ();
14
+ public static final ObjectMapper JSON_MAPPER ;
15
+ static {
16
+ JSON_MAPPER = new ObjectMapper ();
17
+ JSON_MAPPER .registerModule (new JavaTimeModule ());
18
+ JSON_MAPPER .disable (SerializationFeature .WRITE_DATES_AS_TIMESTAMPS );
19
+ }
13
20
14
21
private static final Logger LOG = LoggerFactory .getLogger (Utils .class );
15
22
You can’t perform that action at this time.
0 commit comments