热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.fasterxml.jackson.core.json.JsonWriteContext.writeFieldName()方法的使用及代码示例

本文整理了Java中com.fasterxml.jackson.core.json.JsonWriteContext.writeFieldName()方法的一些代码示例

本文整理了Java中com.fasterxml.jackson.core.json.JsonWriteContext.writeFieldName()方法的一些代码示例,展示了JsonWriteContext.writeFieldName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonWriteContext.writeFieldName()方法的具体详情如下:
包路径:com.fasterxml.jackson.core.json.JsonWriteContext
类名称:JsonWriteContext
方法名:writeFieldName

JsonWriteContext.writeFieldName介绍

[英]Method that writer is to call before it writes a field name.
[中]写入程序在写入字段名之前要调用的方法。

代码示例

代码示例来源:origin: redisson/redisson

@Override
public final void writeFieldName(String name) throws IOException
{
_writeContext.writeFieldName(name);
_append(JsonToken.FIELD_NAME, name);
}

代码示例来源:origin: redisson/redisson

@Override
public void writeFieldName(String name) throws IOException
{
int status = _writeContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name, (status == JsonWriteContext.STATUS_OK_AFTER_COMMA));
}

代码示例来源:origin: redisson/redisson

@Override
public void writeFieldName(SerializableString name) throws IOException
{
_writeContext.writeFieldName(name.getValue());
_append(JsonToken.FIELD_NAME, name);
}

代码示例来源:origin: redisson/redisson

@Override
public final void writeFieldName(String name) throws IOException
{
if (_writeContext.writeFieldName(name) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name);
}

代码示例来源:origin: FasterXML/jackson-core

@Override
public void writeFieldName(String name) throws IOException
{
int status = _outputContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name, (status == JsonWriteContext.STATUS_OK_AFTER_COMMA));
}

代码示例来源:origin: redisson/redisson

@Override
public void writeFieldName(SerializableString name) throws IOException
{
// Object is a value, need to verify it's allowed
int status = _writeContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name, (status == JsonWriteContext.STATUS_OK_AFTER_COMMA));
}

代码示例来源:origin: redisson/redisson

@Override
public final void writeStringField(String fieldName, String value)
throws IOException
{
if (_writeContext.writeFieldName(fieldName) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(fieldName);
writeString(value);
}

代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml

@Override
public final void writeFieldName(String name) throws IOException
{
if (_writeContext.writeFieldName(name) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name);
}

代码示例来源:origin: redisson/redisson

@Override
public final void writeFieldName(SerializableString name)
throws IOException
{
// Object is a value, need to verify it's allowed
if (_writeContext.writeFieldName(name.getValue()) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name.getValue());
}

代码示例来源:origin: FasterXML/jackson-core

@Override
public void writeFieldName(SerializableString name) throws IOException
{
// Object is a value, need to verify it's allowed
int status = _outputContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name, (status == JsonWriteContext.STATUS_OK_AFTER_COMMA));
}

代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml

@Override
public final void writeStringField(String fieldName, String value)
throws IOException
{
if (_writeContext.writeFieldName(fieldName) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(fieldName);
writeString(value);
}

代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml

@Override
public final void writeFieldName(SerializableString name)
throws IOException
{
// Object is a value, need to verify it's allowed
if (_writeContext.writeFieldName(name.getValue()) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name.getValue());
}

代码示例来源:origin: redisson/redisson

int status = _writeContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: redisson/redisson

protected final void _writePPFieldName(SerializableString name) throws IOException
{
final int status = _writeContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
if (status == JsonWriteContext.STATUS_OK_AFTER_COMMA) {
_cfgPrettyPrinter.writeObjectEntrySeparator(this);
} else {
_cfgPrettyPrinter.beforeObjectEntries(this);
}
final boolean addQuotes = !_cfgUnqNames; // standard
if (addQuotes) {
if (_outputTail >= _outputEnd) {
_flushBuffer();
}
_outputBuffer[_outputTail++] = _quoteChar;
}
_writeBytes(name.asQuotedUTF8());
if (addQuotes) {
if (_outputTail >= _outputEnd) {
_flushBuffer();
}
_outputBuffer[_outputTail++] = _quoteChar;
}
}

代码示例来源:origin: redisson/redisson

return;
final int status = _writeContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: FasterXML/jackson-core

int status = _outputContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: redisson/redisson

return;
final int status = _writeContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: FasterXML/jackson-core

return;
final int status = _outputContext.writeFieldName(name);
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: FasterXML/jackson-core

protected final void _writePPFieldName(SerializableString name) throws IOException
final int status = _outputContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

代码示例来源:origin: FasterXML/jackson-core

return;
final int status = _outputContext.writeFieldName(name.getValue());
if (status == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");

推荐阅读
author-avatar
暗蓝语依_431
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有