本文整理匯總了Java中com.fasterxml.jackson.core.JsonGenerator.writeFieldId方法的典型用法代碼示例。如果您正苦於以下問題:Java JsonGenerator.writeFieldId方法的具體用法?Java JsonGenerator.writeFieldId怎麽用?Java JsonGenerator.writeFieldId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.fasterxml.jackson.core.JsonGenerator
的用法示例。
在下文中一共展示了JsonGenerator.writeFieldId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: serialize
import com.fasterxml.jackson.core.JsonGenerator; //導入方法依賴的package包/類
@Override
public void serialize(Face value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeStartObject();
jgen.writeFieldId(1);
jgen.writeObject(value.sai);
jgen.writeFieldId(5);
jgen.writeNumber(value.getTs().getTime()/1000);
jgen.writeFieldId(6);
jgen.writeNumber(value.getLifetime());
jgen.writeFieldId(12);
jgen.writeBinary(value.getNonce());
jgen.writeFieldId(7);
jgen.writeNumber(value.macMethod.encoding);
jgen.writeEndObject();
}
示例2: serialize
import com.fasterxml.jackson.core.JsonGenerator; //導入方法依賴的package包/類
@Override
public void serialize(TicketRequestMessage value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeFieldId(0);
jgen.writeString(value.samUrl);
jgen.writeFieldId(1);
jgen.writeObject(value.sai);
jgen.writeFieldId(5);
jgen.writeNumber(value.timestamp.getTime()/1000);
}
示例3: serialize
import com.fasterxml.jackson.core.JsonGenerator; //導入方法依賴的package包/類
@Override
public void serialize(TicketGrantMessage value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeStartObject();
jgen.writeFieldId(8);
jgen.writeObject(value.getFace());
jgen.writeFieldId(9);
jgen.writeObject(value.getVerifier().getVerifier());
jgen.writeEndObject();
}
示例4: serialize
import com.fasterxml.jackson.core.JsonGenerator; //導入方法依賴的package包/類
@Override
public void serialize(AccessRequest value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeFieldId(0);
jgen.writeString(value.samUrl);
jgen.writeFieldId(1);
jgen.writeObject(value.sai);
jgen.writeFieldId(5);
jgen.writeNumber(value.timestamp.getTime()/1000);
}