Build optimization (#2253)
This commit is contained in:
committed by
GitHub
parent
e5abeb4fd9
commit
84956990b6
@@ -5,8 +5,8 @@ import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class JsonUtil {
|
||||
public static byte[] toJson(Object object) throws IOException {
|
||||
class JsonUtil {
|
||||
static byte[] toJson(Object object) throws IOException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
return mapper.writeValueAsBytes(object);
|
||||
|
||||
Reference in New Issue
Block a user