本文整理了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");