本文整理汇总了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);
}