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); }
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); } }
@Override protected void _acceptTimestampVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException { JsonIntegerFormatVisitor v2 = visitor.expectIntegerFormat(typeHint); if (v2 != null) { v2.numberType(JsonParser.NumberType.LONG); SerializerProvider provider = visitor.getProvider(); if ((provider != null) && provider.isEnabled(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS)) { // big number, no more specific qualifier to use... } else { // otherwise good old Unix timestamp, in milliseconds v2.format(JsonValueFormat.UTC_MILLISEC); } } }
@Override protected void _acceptTimestampVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException { JsonIntegerFormatVisitor v2 = visitor.expectIntegerFormat(typeHint); if (v2 != null) { v2.numberType(JsonParser.NumberType.LONG); } }
@Override public JsonIntegerFormatVisitor expectIntegerFormat(JavaType type) throws JsonMappingException { addFieldIfPresent("Integer"); return new JsonIntegerFormatVisitor.Base(); }
public final void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType) { JsonIntegerFormatVisitor localJsonIntegerFormatVisitor = paramJsonFormatVisitorWrapper.expectIntegerFormat(paramJavaType); if (localJsonIntegerFormatVisitor != null) localJsonIntegerFormatVisitor.numberType(JsonParser.NumberType.INT); }
public final void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType) { JsonIntegerFormatVisitor localJsonIntegerFormatVisitor = paramJsonFormatVisitorWrapper.expectIntegerFormat(paramJavaType); if (localJsonIntegerFormatVisitor != null) localJsonIntegerFormatVisitor.numberType(JsonParser.NumberType.LONG); }
@Override public JsonIntegerFormatVisitor expectIntegerFormat(JavaType type) throws JsonMappingException { return setTypeAndReturn(new TSJsonNumberFormatVisitor(this, conf)); }