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


Java JsonRawValue类代码示例

本文整理汇总了Java中com.fasterxml.jackson.annotation.JsonRawValue的典型用法代码示例。如果您正苦于以下问题:Java JsonRawValue类的具体用法?Java JsonRawValue怎么用?Java JsonRawValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getOutput

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonRawValue
public List<Output> getOutput() {
	return output;
}
 
开发者ID:rmpestano,项目名称:cukedoctor,代码行数:5,代码来源:Step.java

示例2: getDataAsJson

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonRawValue
@JsonProperty("data")
public String getDataAsJson() throws JsonProcessingException {
    if (json == null) {
        json = Json.mapper().writeValueAsString(data);
    }
    return json;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:9,代码来源:ModelData.java

示例3: createContextual

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctx,
                                            BeanProperty property) throws JsonMappingException {
    if (property != null && property.getMember().getAnnotation(JsonRawValue.class) != null) {
        return this;
    }
    return new StringDeserializer();
}
 
开发者ID:gravitee-io,项目名称:graviteeio-access-management,代码行数:9,代码来源:CommonModule.java

示例4: checkMethodHasJsonRawValueAnnotation

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
/**
 * 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");
    }
}
 
开发者ID:box,项目名称:mojito,代码行数:18,代码来源:JsonRawStringAspect.java

示例5: getBody

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonRawValue
public String getBody() {
    if(body != null && body.trim().isEmpty()) {
        return null;
    }
    return body;
}
 
开发者ID:nielsutrecht,项目名称:spring-async,代码行数:8,代码来源:ApiResponse.java

示例6: getValue

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonProperty
@JsonRawValue
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getValue()
{
    return value;
}
 
开发者ID:dhis2,项目名称:dhis2-core,代码行数:8,代码来源:MetadataAudit.java

示例7: findSerializer

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
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;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:15,代码来源:JacksonAnnotationIntrospector.java

示例8: updateBuilder

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@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;
}
 
开发者ID:Talend,项目名称:data-prep,代码行数:13,代码来源:JsonAsStringBeanDeserializerModifier.java

示例9: getAllMetrics

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonRawValue
public String getAllMetrics() {
    return allMetrics;
}
 
开发者ID:IBMStreams,项目名称:streamsx.jmxclients,代码行数:5,代码来源:AllJobMetrics.java

示例10: setDataFromJson

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonRawValue
@JsonProperty("data")
public void setDataFromJson(JsonNode json) throws JsonProcessingException {
    this.data = null;
    this.json = Json.mapper().writeValueAsString(json);
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:7,代码来源:ModelData.java

示例11: getEvent

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonGetter
@JsonRawValue
public String getEvent() {
    return event;
}
 
开发者ID:kloiasoft,项目名称:eventapis,代码行数:6,代码来源:PublishedEventWrapper.java

示例12: getValue

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonValue
@JsonRawValue
public String getValue() {
    return value;
}
 
开发者ID:kbss-cvut,项目名称:reporting-tool,代码行数:6,代码来源:RawJson.java

示例13: getMe

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonView(RestrictedViews.Public.class)
@JsonRawValue
@JsonProperty
public String getMe() {
    return me;
}
 
开发者ID:StallionCMS,项目名称:stallion-core,代码行数:7,代码来源:ContextView.java

示例14: getMessageAsJson

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonProperty(value = "message")
@JsonRawValue
@JsonRawString
public String getMessageAsJson() {
    return message;
}
 
开发者ID:box,项目名称:mojito,代码行数:7,代码来源:PollableTask.java

示例15: getErrorMessageAsJson

import com.fasterxml.jackson.annotation.JsonRawValue; //导入依赖的package包/类
@JsonProperty(value = "errorMessage")
@JsonRawValue
@JsonRawString
public String getErrorMessageAsJson() {
    return errorMessage;
}
 
开发者ID:box,项目名称:mojito,代码行数:7,代码来源:PollableTask.java


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