@JsonProperty @JsonSerialize(keyUsing = ColumnStatisticMetadataKeySerializer.class) @JsonDeserialize(keyUsing = ColumnStatisticMetadataKeyDeserializer.class) public Map<ColumnStatisticMetadata, T> getColumnStatistics() { return columnStatistics; }
@JsonProperty @JsonSerialize( contentAs = BaseIdentifiableObject.class ) @JacksonXmlElementWrapper( localName = "dataElements", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "dataElement", namespace = DxfNamespaces.DXF_2_0 ) public List<DataElement> getDataElements() { return dataElements; }
@JsonProperty @JsonSerialize(using = CommaListJoinSerializer.class) public List<String> getMetrics() { return metrics; }
/** * Static (not live-reloaded) portions of TimeLock's configuration. */ @JsonDeserialize(as = ImmutableTimeLockInstallConfiguration.class) @JsonSerialize(as = ImmutableTimeLockInstallConfiguration.class) @Value.Immutable @JsonIgnoreProperties(value = "asyncLock") public interface TimeLockInstallConfiguration { PaxosInstallConfiguration paxos(); ClusterConfiguration cluster(); @Value.Default default TsBoundPersisterConfiguration timestampBoundPersistence() { return ImmutablePaxosTsBoundPersisterConfiguration.builder().build(); } }
@EqualsAndHashCode @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true) public class RequestDetailsLogger { private final HttpServletRequest request = ServletContextHolder.getRequest(); @JsonProperty("request_id") private String requestId = ServletContextHolder.fetchRequestId(); @JsonProperty("url") private String url = request.getRequestURL().toString(); @JsonProperty("method") private String method = request.getMethod(); @JsonProperty("request_body") @JsonSerialize(using = StringToMapSerializer.class) private String requestBody = (String) ServletContextHolder.getRequest().getAttribute(RequestAttributeConst.REQUEST_BODY_KEY); @JsonProperty("request_time") @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class) private OffsetDateTime requestTime = OffsetDateTime.now(); @JsonProperty("response_time") @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class) private OffsetDateTime responseTime;
@JsonDeserialize(using = RangeBoundValueDeserializer.class) @JsonSerialize(using = RangeBoundValueSerializer.class) public class RangeBoundValue { private final List<Object> values; public RangeBoundValue(List<Object> values) { this.values = ImmutableList.copyOf(values); } public List<Object> getValues() { return values; } }
/** * @author Zhao Junjian */ @Getter @Setter @AllArgsConstructor @ToString @EqualsAndHashCode @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true) public class Participant implements Serializable { private static final long serialVersionUID = -8013238614014494468L; @ApiModelProperty(value = "发起确认操作的URI", required = true, example = "http://www.example.com/part/123") private String uri; @ApiModelProperty(value = "过期时间, ISO标准", required = true, example = "2017-03-20T14:00:41+08:00") @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class) private OffsetDateTime expireTime; }
@JsonIgnoreProperties(ignoreUnknown = true) public class XmlMessageHeader implements Serializable { @JacksonXmlProperty(localName = "MsgType") @JacksonXmlCData protected MsgType msgType; @JacksonXmlProperty(localName = "ToUserName") @JacksonXmlCData private String toUser; @JacksonXmlProperty(localName = "FromUserName") @JacksonXmlCData private String fromUser; @JacksonXmlProperty(localName = "CreateTime") @JsonDeserialize(using = DateDeserializer.class) @JsonSerialize(using = DateSerializer.class) private Date createTime;
@JsonSerialize(using = PathsSerializer.class) public abstract Paths getPaths(); }
final Class<?> serClass = (jsonSer == null) ? null : _classIfExplicit(jsonSer.as()); if (serClass != null) { if (type.hasRawClass(serClass)) { final Class<?> keyClass = (jsonSer == null) ? null : _classIfExplicit(jsonSer.keyAs()); if (keyClass != null) { if (keyType.hasRawClass(keyClass)) { if (contentType != null) { // collection[like], map[like], array, reference final Class<?> contentClass = (jsonSer == null) ? null : _classIfExplicit(jsonSer.contentAs()); if (contentClass != null) { if (contentType.hasRawClass(contentClass)) {
@Override public Object findSerializer(Annotated a) { JsonSerialize ann = _findAnnotation(a, JsonSerialize.class); if (ann != null) { @SuppressWarnings("rawtypes") Class<? extends JsonSerializer> serClass = ann.using(); if (serClass != JsonSerializer.None.class) { return serClass; } } /* 18-Oct-2010, tatu: [JACKSON-351] @JsonRawValue handled just here, for now; * if we need to get raw indicator from other sources need to add * separate accessor within {@link AnnotationIntrospector} interface. */ JsonRawValue annRaw = _findAnnotation(a, JsonRawValue.class); if ((annRaw != null) && annRaw.value()) { // let's construct instance with nominal type: Class<?> cls = a.getRawType(); return new RawSerializer<Object>(cls); } return null; }
@JsonProperty @JsonSerialize( contentAs = BaseIdentifiableObject.class ) @JacksonXmlElementWrapper( localName = "interpretations", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "interpretation", namespace = DxfNamespaces.DXF_2_0 ) public Set<Interpretation> getInterpretations() { return interpretations; }
@JsonProperty @JsonSerialize(using = CommaListJoinSerializer.class) public List<String> getDimensions() { return dimensions; }
@JsonSerialize(as = ImmutableFailEvent.class) @JsonDeserialize(as = ImmutableFailEvent.class) @JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeName(FailEvent.TYPE) @Value.Immutable public abstract class FailEvent implements Event { public static final String TYPE = "fail"; @Override public abstract long time(); public abstract int process(); public abstract String error(); @Override public void accept(EventVisitor visitor) { visitor.visit(this); } }
@Value.Immutable(builder = false) @JsonSerialize(as = ImmutableConstructorJacksonMapped.class) @JsonDeserialize(as = ImmutableConstructorJacksonMapped.class) public interface ConstructorJacksonMapped { @Value.Parameter @JsonProperty("X") int instance(); @Value.Parameter String bal(); }
/** * @author Zhao Junjian */ @Getter @Setter @AllArgsConstructor @ToString @EqualsAndHashCode @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true) public class Participant implements Serializable { private static final long serialVersionUID = -8013238614014494468L; @ApiModelProperty(value = "发起确认操作的URI", required = true, example = "http://www.example.com/part/123") private String uri; @ApiModelProperty(value = "过期时间, ISO标准", required = true, example = "2017-03-20T14:00:41+08:00") @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class) private OffsetDateTime expireTime; }
@JsonSerialize(using=TestBeanSimpleSerializer.class) public static class TestBeanSimpleAnnotated extends TestBeanSimple { }
@JsonProperty @JsonSerialize( contentAs = BaseIdentifiableObject.class ) @JacksonXmlElementWrapper( localName = "categoryOptionCombos", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "categoryOptionCombo", namespace = DxfNamespaces.DXF_2_0 ) public Set<CategoryOptionCombo> getCategoryOptionCombos() { return categoryOptionCombos; }
@JsonProperty(value = "time") @JsonDeserialize(using = com.spotify.docker.client.jackson.UnixTimestampDeserializer.class) @JsonSerialize(using = com.spotify.docker.client.jackson.UnixTimestampSerializer.class) @Override public Date time() { return time; }
@JsonProperty("created") @JsonSerialize(using = InstantSerializer.class) public Instant getAcceptedTime() { return acceptedTime; }