public class JSONEngineConfig extends Object implements Serializable
Constructor and Description |
---|
JSONEngineConfig() |
Modifier and Type | Method and Description |
---|---|
String |
getDateFormat()
日期格式,null表示默认的时间戳
|
boolean |
isIgnoreNullValue()
是否忽略null值
|
boolean |
isPrettyPrint()
获取是否启用格式化输出
|
static JSONEngineConfig |
of()
创建JSON引擎配置
|
JSONEngineConfig |
setDateFormat(String dateFormat)
设置日期格式,null表示默认的时间戳
此方法设置的日期格式仅对转换为JSON字符串有效,对解析JSON为bean无效。 |
JSONEngineConfig |
setIgnoreNullValue(boolean ignoreNullValue)
设置是否忽略null值
|
JSONEngineConfig |
setPrettyPrint(boolean prettyPrint)
设置是否启用格式化输出
|
public static JSONEngineConfig of()
public boolean isPrettyPrint()
public JSONEngineConfig setPrettyPrint(boolean prettyPrint)
prettyPrint
- 布尔值,指示是否启用格式化输出public String getDateFormat()
public JSONEngineConfig setDateFormat(String dateFormat)
dateFormat
- 日期格式,null表示默认的时间戳public boolean isIgnoreNullValue()
public JSONEngineConfig setIgnoreNullValue(boolean ignoreNullValue)
ignoreNullValue
- 是否忽略null值Copyright © 2025. All rights reserved.