This commit is contained in:
Looly
2022-02-13 19:09:36 +08:00
parent cedbc88571
commit c83e2ce380
4 changed files with 67 additions and 6 deletions

View File

@@ -7,10 +7,10 @@ import java.io.Serializable;
/**
* 用于定义{@code null}与Javascript中null相对应<br>
* Java中的{@code null}值在js中表示为undefined。
* @author Looly
*
* @author Looly
*/
public class JSONNull implements Serializable{
public class JSONNull implements Serializable {
private static final long serialVersionUID = 2633815155870764938L;
/**
@@ -35,7 +35,7 @@ public class JSONNull implements Serializable{
/**
* Get the "null" string value.
*获得“null”字符串
* 获得“null”字符串
*
* @return The string "null".
*/

View File

@@ -743,7 +743,7 @@ public class JSONUtil {
return jsonConfig.isIgnoreNullValue() ? null : JSONNull.NULL;
}
if (object instanceof JSON //
|| JSONNull.NULL.equals(object) //
|| ObjectUtil.isNull(object) //
|| object instanceof JSONString //
|| object instanceof CharSequence //
|| object instanceof Number //