当前位置: 首页>>代码示例>>Java>>正文


Java JsonFormatVisitorWrapper.expectStringFormat方法代码示例

本文整理汇总了Java中com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectStringFormat方法的典型用法代码示例。如果您正苦于以下问题:Java JsonFormatVisitorWrapper.expectStringFormat方法的具体用法?Java JsonFormatVisitorWrapper.expectStringFormat怎么用?Java JsonFormatVisitorWrapper.expectStringFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper的用法示例。


在下文中一共展示了JsonFormatVisitorWrapper.expectStringFormat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  boolean bool1 = this._useTimestamp;
  boolean bool2 = bool1;
  if ((!bool1) && (this._customFormat == null))
    bool2 = paramJsonFormatVisitorWrapper.getProvider().isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
  if (bool2)
  {
    JsonIntegerFormatVisitor localJsonIntegerFormatVisitor = paramJsonFormatVisitorWrapper.expectIntegerFormat(paramJavaType);
    if (localJsonIntegerFormatVisitor != null)
    {
      localJsonIntegerFormatVisitor.numberType(JsonParser.NumberType.LONG);
      localJsonIntegerFormatVisitor.format(JsonValueFormat.UTC_MILLISEC);
    }
    return;
  }
  JsonStringFormatVisitor localJsonStringFormatVisitor = paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
  if (localJsonStringFormatVisitor != null)
    localJsonStringFormatVisitor.format(JsonValueFormat.DATE_TIME);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:21,代码来源:DateTimeSerializerBase.java

示例2: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  if (paramJsonFormatVisitorWrapper.getProvider().isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX))
  {
    JsonIntegerFormatVisitor localJsonIntegerFormatVisitor = paramJsonFormatVisitorWrapper.expectIntegerFormat(paramJavaType);
    if (localJsonIntegerFormatVisitor != null)
      localJsonIntegerFormatVisitor.numberType(JsonParser.NumberType.INT);
    return;
  }
  JsonStringFormatVisitor localJsonStringFormatVisitor = paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
  if ((paramJavaType != null) && (localJsonStringFormatVisitor != null) && (paramJavaType.isEnumType()))
  {
    LinkedHashSet localLinkedHashSet = new LinkedHashSet();
    Iterator localIterator = this._values.values().iterator();
    while (localIterator.hasNext())
      localLinkedHashSet.add(((SerializedString)localIterator.next()).getValue());
    localJsonStringFormatVisitor.enumTypes(localLinkedHashSet);
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:20,代码来源:EnumSerializer.java

示例3: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
{
    // [JACKSON-684]: serialize as index?
	if (visitor.getProvider().isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX)) {
		visitor.expectIntegerFormat(typeHint);
	} else {
		JsonStringFormatVisitor stringVisitor = visitor.expectStringFormat(typeHint);
		if (typeHint != null) {
			if (typeHint.isEnumType()) {
				Set<String> enums = new HashSet<String>();
				for (SerializedString value : _values.values()) {
					enums.add(value.getValue());
				}
				stringVisitor.enumTypes(enums);
			}
		}
	}
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:20,代码来源:EnumSerializer.java

示例4: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
        throws JsonMappingException {
    if (visitor != null) {
        visitor.expectStringFormat(typeHint);
    }
}
 
开发者ID:SolarNetwork,项目名称:killbill-easytax-plugin,代码行数:8,代码来源:BigDecimalStringSerializer.java

示例5: _acceptTimestampVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
protected void _acceptTimestampVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
{
    SerializerProvider provider = visitor.getProvider();
    boolean useTimestamp = (provider != null) && useTimestamp(provider);
    if (useTimestamp) {
        super._acceptTimestampVisitor(visitor, typeHint);
    } else {
        JsonStringFormatVisitor v2 = visitor.expectStringFormat(typeHint);
        if (v2 != null) {
            v2.format(JsonValueFormat.DATE_TIME);
        }
    }
}
 
开发者ID:FasterXML,项目名称:jackson-modules-java8,代码行数:15,代码来源:YearMonthSerializer.java

示例6: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
{
    SerializerProvider provider = visitor.getProvider();
    boolean useTimestamp = (provider != null) && useTimestamp(provider);
    if (useTimestamp) {
        _acceptTimestampVisitor(visitor, typeHint);
    } else {
        JsonStringFormatVisitor v2 = visitor.expectStringFormat(typeHint);
        if (v2 != null) {
            v2.format(JsonValueFormat.DATE_TIME);
        }
    }
}
 
开发者ID:FasterXML,项目名称:jackson-modules-java8,代码行数:15,代码来源:JSR310FormattedSerializerBase.java

示例7: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
{
    SerializerProvider provider = visitor.getProvider();
    boolean useTimestamp = (provider != null) && useTimestamp(provider);
    if (useTimestamp) {
        _acceptTimestampVisitor(visitor, typeHint);
    } else {
        JsonStringFormatVisitor v2 = visitor.expectStringFormat(typeHint);
        if (v2 != null) {
            v2.format(JsonValueFormat.DATE);
        }
    }
}
 
开发者ID:FasterXML,项目名称:jackson-modules-java8,代码行数:15,代码来源:LocalDateSerializer.java

示例8: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  JsonStringFormatVisitor localJsonStringFormatVisitor1;
  if (paramJsonFormatVisitorWrapper == null)
    localJsonStringFormatVisitor1 = null;
  else
    localJsonStringFormatVisitor1 = paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
  JsonStringFormatVisitor localJsonStringFormatVisitor2 = localJsonStringFormatVisitor1;
  if (localJsonStringFormatVisitor1 != null)
    localJsonStringFormatVisitor2.format(JsonValueFormat.DATE_TIME);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:12,代码来源:SqlTimeSerializer.java

示例9: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(final JsonFormatVisitorWrapper visitor, final JavaType hint)
        throws JsonMappingException {
    visitor.expectStringFormat(hint);
}
 
开发者ID:zalando,项目名称:jackson-datatype-money,代码行数:6,代码来源:CurrencyUnitSerializer.java

示例10: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public final void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  if (paramJsonFormatVisitorWrapper != null)
    paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:StringSerializer.java

示例11: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public final void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:StdJdkSerializers.java

示例12: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  if (paramJsonFormatVisitorWrapper != null)
    paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:ToStringSerializer.java

示例13: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  paramJsonFormatVisitorWrapper.expectStringFormat(paramJavaType);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:StdKeySerializer.java

示例14: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
{
	visitor.expectStringFormat(typeHint);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:6,代码来源:StringSerializer.java

示例15: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; //导入方法依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
{
    visitor.expectStringFormat(typeHint);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:6,代码来源:RawSerializer.java


注:本文中的com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.expectStringFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。