@JsonRawValue public List<Output> getOutput() { return output; }
@JsonRawValue @JsonProperty("data") public String getDataAsJson() throws JsonProcessingException { if (json == null) { json = Json.mapper().writeValueAsString(data); } return json; }
@Override public JsonDeserializer<?> createContextual(DeserializationContext ctx, BeanProperty property) throws JsonMappingException { if (property != null && property.getMember().getAnnotation(JsonRawValue.class) != null) { return this; } return new StringDeserializer(); }
/** * TODO(P2) try to do this with aspect @DeclareError * * Checks that the method annotated with {@link JsonRawString} also has the * {@link JsonRawValue} for Jackson to actually serialize as expected. * * @param pjp */ private void checkMethodHasJsonRawValueAnnotation(ProceedingJoinPoint pjp) { MethodSignature methodSignature = (MethodSignature) pjp.getSignature(); Method targetMethod = methodSignature.getMethod(); if (targetMethod.getAnnotation(JsonRawValue.class) == null) { throw new RuntimeException("The method annotated with @JsonRawString must also be annotated with @JsonRawValue"); } }
@JsonRawValue public String getBody() { if(body != null && body.trim().isEmpty()) { return null; } return body; }
@JsonProperty @JsonRawValue @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getValue() { return value; }
public Object findSerializer(Annotated paramAnnotated) { JsonSerialize localJsonSerialize = (JsonSerialize)paramAnnotated.getAnnotation(JsonSerialize.class); if (localJsonSerialize != null) { Class localClass = localJsonSerialize.using(); if (localClass != JsonSerializer.None.class) return localClass; } JsonRawValue localJsonRawValue = (JsonRawValue)paramAnnotated.getAnnotation(JsonRawValue.class); if ((localJsonRawValue != null) && (localJsonRawValue.value())) return new RawSerializer(paramAnnotated.getRawType()); return null; }
@Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { Iterator<SettableBeanProperty> it = builder.getProperties(); while (it.hasNext()) { SettableBeanProperty p = it.next(); if (p.getAnnotation(JsonRawValue.class) != null) { builder.addOrReplaceProperty(p.withValueDeserializer(JsonAsStringDeserializer.INSTANCE), true); } } return builder; }
@JsonRawValue public String getAllMetrics() { return allMetrics; }
@JsonRawValue @JsonProperty("data") public void setDataFromJson(JsonNode json) throws JsonProcessingException { this.data = null; this.json = Json.mapper().writeValueAsString(json); }
@JsonGetter @JsonRawValue public String getEvent() { return event; }
@JsonValue @JsonRawValue public String getValue() { return value; }
@JsonView(RestrictedViews.Public.class) @JsonRawValue @JsonProperty public String getMe() { return me; }
@JsonProperty(value = "message") @JsonRawValue @JsonRawString public String getMessageAsJson() { return message; }
@JsonProperty(value = "errorMessage") @JsonRawValue @JsonRawString public String getErrorMessageAsJson() { return errorMessage; }
@JsonRawValue public String getJsonString() { return "{\"a\": 1, \"b\": [1,2,3]}"; }
@JsonRawValue public String getNonJsonString() { return "This is a simple string that doesn't contain JSON"; }
@JsonRawValue @JsonRawString public String getJsonString() { return "{\"a\": 1, \"b\": [1,2,3]}"; }
@JsonRawValue @JsonRawString public String getNonJsonString() { return "This is a simple string that doesn't contain JSON"; }
@JsonRawValue public final JsonNode getPayload() { return payload; }
@JsonRawValue public final JsonNode getPayload() { return this.payload; }
@XmlElement(nillable = true) @JsonRawValue public String getProfileData() { return profileData; }
@JsonRawValue public Object getPayLoad() { return payLoad; }
@JsonRawValue @Override public Object getV() { return super.getV(); }
/** * @return The filter (as raw JSON) for the export. * @see org.talend.dataprep.api.filter.FilterService */ @JsonRawValue public String getFilter() { return filter == null ? null : filter.toString(); }
/** * @return The filter (as raw JSON) for the aggregation. * @see org.talend.dataprep.api.filter.FilterService */ @JsonRawValue public String getFilter() { return filter == null ? null : filter.toString(); }
@JsonValue @JsonRawValue public String value() { return value; }
@JsonRawValue public String getData() { return data == null ? null : data.toString(); }
@JsonRawValue public String getValue() { return value; }
@JsonRawValue public String getCluster() { return cluster; }
@JsonRawValue public String getBlueprintCustomProperties() { return blueprintCustomProperties; }
@JsonRawValue public String getTemplate() { return template; }
@JsonProperty("raw") @JsonRawValue public T foobar() { return _value; }