ro.pippo.core.Application.getContentTypeEngine()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中ro.pippo.core.Application.getContentTypeEngine()方法的一些代码示例,展示了Application.getContentTypeEngine()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getContentTypeEngine()方法的具体详情如下:
包路径:ro.pippo.core.Application
类名称:Application
方法名:getContentTypeEngine

Application.getContentTypeEngine介绍

暂无

代码示例

代码示例来源:origin: pippo-java/pippo

@Override
public Object serialize(ObjectMapperSerializationContext context) {
  ContentTypeEngine engine = pippo.getApplication().getContentTypeEngine(context.getContentType());
  if (engine == null) {
    throw new PippoRuntimeException("No ContentTypeEngine registered for {}", context.getContentType());
  }
  return engine.toString(context.getObjectToSerialize());
}

代码示例来源:origin: pippo-java/pippo

@Override
public Object deserialize(ObjectMapperDeserializationContext context) {
  ContentTypeEngine engine = pippo.getApplication().getContentTypeEngine(context.getContentType());
  if (engine == null) {
    throw new PippoRuntimeException("No ContentTypeEngine registered for {}", context.getContentType());
  }
  return engine.fromString(context.getDataToDeserialize().asString(), context.getType());
}

代码示例来源:origin: pippo-java/pippo

} else {
  ContentTypeEngine engine = application.getContentTypeEngine(contentType);
  if (engine == null) {
    log.warn("No registered content type engine for '{}'", contentType);

代码示例来源:origin: ro.pippo/pippo-test

@Override
public Object serialize(ObjectMapperSerializationContext context) {
  ContentTypeEngine engine = pippo.getApplication().getContentTypeEngine(context.getContentType());
  if (engine == null) {
    throw new PippoRuntimeException("No ContentTypeEngine registered for {}", context.getContentType());
  }
  return engine.toString(context.getObjectToSerialize());
}

代码示例来源:origin: ro.pippo/pippo-test

@Override
public Object deserialize(ObjectMapperDeserializationContext context) {
  ContentTypeEngine engine = pippo.getApplication().getContentTypeEngine(context.getContentType());
  if (engine == null) {
    throw new PippoRuntimeException("No ContentTypeEngine registered for {}", context.getContentType());
  }
  return engine.fromString(context.getDataToDeserialize().asString(), context.getType());
}

相关文章