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


Java JsonSerializable类代码示例

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


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

示例1: jsonSerializableResponseView

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
@Test
public void jsonSerializableResponseView() throws Exception {
    ModelResponse<? extends Sushi> response = Bastion.request(FileRequest.post("http://localhost:9876/sushi",
                                                                               "classpath:/json/create_sushi_request.json"))
                                                     .bind(Sushi.class)
                                                     .call()
                                                     .getResponse();
    Optional<JsonSerializable.Base> node = response.getView(JsonSerializable.Base.class);
    assertThat(node).isNotEmpty();
}
 
开发者ID:bastion-dev,项目名称:Bastion,代码行数:11,代码来源:ResponseViewsTest.java

示例2: findSerializerByAnnotations

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
protected final JsonSerializer<?> findSerializerByAnnotations(SerializerProvider paramSerializerProvider, JavaType paramJavaType, BeanDescription paramBeanDescription)
{
  if (JsonSerializable.class.isAssignableFrom(paramJavaType.getRawClass()))
    return SerializableSerializer.instance;
  AnnotatedMethod localAnnotatedMethod = paramBeanDescription.findJsonValueMethod();
  if (localAnnotatedMethod != null)
  {
    Method localMethod = localAnnotatedMethod.getAnnotated();
    if (paramSerializerProvider.canOverrideAccessModifiers())
      ClassUtil.checkAndFixAccess(localMethod);
    return new JsonValueSerializer(localMethod, findSerializerFromAnnotation(paramSerializerProvider, localAnnotatedMethod));
  }
  return null;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:15,代码来源:BasicSerializerFactory.java

示例3: serializeWithType

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
@Override
public final void serializeWithType(JsonSerializable value, JsonGenerator jgen, SerializerProvider provider,
        TypeSerializer typeSer)
    throws IOException, JsonGenerationException
{
    value.serializeWithType(jgen, provider, typeSer);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:8,代码来源:SerializableSerializer.java

示例4: SerializableSerializer

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
protected SerializableSerializer()
{
  super(JsonSerializable.class);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SerializableSerializer.java

示例5: serialize

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
public void serialize(JsonSerializable paramJsonSerializable, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
{
  paramJsonSerializable.serialize(paramJsonGenerator, paramSerializerProvider);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SerializableSerializer.java

示例6: serializeWithType

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
public final void serializeWithType(JsonSerializable paramJsonSerializable, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
{
  paramJsonSerializable.serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SerializableSerializer.java

示例7: serialize

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
@Override
public void serialize(JsonSerializable value, JsonGenerator jgen, SerializerProvider provider)
    throws IOException, JsonGenerationException
{
    value.serialize(jgen, provider);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:7,代码来源:SerializableSerializer.java

示例8: SerializableSerializer

import com.fasterxml.jackson.databind.JsonSerializable; //导入依赖的package包/类
protected SerializableSerializer() { super(JsonSerializable.class); } 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:2,代码来源:SerializableSerializer.java


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