|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 枚举常量 | 字段 | 方法 | 详细信息: 枚举常量 | 字段 | 方法 | |||||||||
java.lang.Objectjava.lang.Enum<JSONFeature>
org.test4j.json.helper.JSONFeature
public enum JSONFeature
json编码特性
| 枚举常量摘要 | |
|---|---|
IgnoreExplicitFieldType
是否忽略显式的字段类型输出 当field字段类型等于实际对象的类型时 |
|
QuoteAllItems
给字段名称加引号 "fiendname":"fieldvalue" |
|
SkipNullValue
忽略null字段和属性 |
|
UnMarkClassFlag
标记对应的class类型 eg: "#class:org.test4j.bean.User" |
|
UseSingleQuote
用单引号替代双引号 'fieldname':'fieldvalue' |
|
| 字段摘要 | |
|---|---|
static String |
ClazzFlag
类型标识 |
static String |
ErrroFlag
异常标识 |
static String |
ReferFlag
引用标识 |
static String |
ValueFlag
单值标识 |
| 方法摘要 | |
|---|---|
static int |
getFeaturesMask(JSONFeature... features)
返回特性值的掩码 |
int |
getMask()
|
static List<JSONFeature> |
getSerializerFeatures(int features)
根据掩码值返回特性列表 |
static boolean |
isEnabled(int features,
JSONFeature feature)
根据掩码值判断某个特性是否有效 |
static JSONFeature |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。 |
static JSONFeature[] |
values()
按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。 |
| 从类 java.lang.Enum 继承的方法 |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| 从类 java.lang.Object 继承的方法 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| 枚举常量详细信息 |
|---|
public static final JSONFeature UnMarkClassFlag
public static final JSONFeature QuoteAllItems
public static final JSONFeature UseSingleQuote
public static final JSONFeature SkipNullValue
public static final JSONFeature IgnoreExplicitFieldType
| 字段详细信息 |
|---|
public static final String ClazzFlag
public static final String ValueFlag
public static final String ReferFlag
public static final String ErrroFlag
| 方法详细信息 |
|---|
public static JSONFeature[] values()
for (JSONFeature c : JSONFeature.values()) System.out.println(c);
public static JSONFeature valueOf(String name)
name - 要返回的枚举常量的名称。
如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentExceptionpublic final int getMask()
public static boolean isEnabled(int features,
JSONFeature feature)
features - feature -
public static int getFeaturesMask(JSONFeature... features)
features -
public static List<JSONFeature> getSerializerFeatures(int features)
features -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 枚举常量 | 字段 | 方法 | 详细信息: 枚举常量 | 字段 | 方法 | |||||||||