AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | Public 属性 | 所有成员列表
com.google.gson.LongSerializationPolicy 枚举类型参考

Public 成员函数

abstract JsonElement serialize (Long value)
 

Public 属性

 DEFAULT
 
 STRING
 

详细描述

Defines the expected format for a

long

or

Long

type when its serialized.

自从
1.3
作者
Inderjeet Singh
Joel Leitch

成员函数说明

abstract JsonElement com.google.gson.LongSerializationPolicy.serialize ( Long  value)
abstract

Serialize this

value

using this serialization policy.

参数
valuethe long value to be serialized into a JsonElement
返回
the serialized version of
value

类成员变量说明

com.google.gson.LongSerializationPolicy.DEFAULT
初始值:
=() {
public JsonElement serialize(Long value) {
return new JsonPrimitive(value);
}
}

This is the "default" serialization policy that will output a

long

object as a JSON number. For example, assume an object has a long field named "f" then the serialized output would be:

{"f":123}

.

com.google.gson.LongSerializationPolicy.STRING
初始值:
=() {
public JsonElement serialize(Long value) {
return new JsonPrimitive(String.valueOf(value));
}
}

Serializes a long value as a quoted string. For example, assume an object has a long field named "f" then the serialized output would be:

{"f":"123"}

.


枚举说明文档从下列文件生成: