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


Java SerializationFeature.INDENT_OUTPUT属性代码示例

本文整理汇总了Java中com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT属性的典型用法代码示例。如果您正苦于以下问题:Java SerializationFeature.INDENT_OUTPUT属性的具体用法?Java SerializationFeature.INDENT_OUTPUT怎么用?Java SerializationFeature.INDENT_OUTPUT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.fasterxml.jackson.databind.SerializationFeature的用法示例。


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

示例1: AppConfigurationJsonMapper

/**
 * Initializes the JSON constructor.
 */
public AppConfigurationJsonMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(AppConfiguration.class, AppConfigurationSerializer.getInstance());
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addDeserializer(AppConfiguration.class, AppConfigurationDeserializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:13,代码来源:AppConfigurationJsonMapper.java

示例2: AppConfigurationYamlMapper

/**
 * Initializes the YAML constructor.
 */
public AppConfigurationYamlMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(AppConfiguration.class, AppConfigurationSerializer.getInstance());
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addDeserializer(AppConfiguration.class, AppConfigurationDeserializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:13,代码来源:AppConfigurationYamlMapper.java

示例3: ControllerYamlMapper

/**
 * Initializes the YAML constructor.
 */
public ControllerYamlMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:11,代码来源:ControllerYamlMapper.java

示例4: ControllerJsonMapper

/**
 * Initializes the JSON constructor.
 */
public ControllerJsonMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:11,代码来源:ControllerJsonMapper.java

示例5: BotCommandJsonMapper

/**
 * Initializes the JSON constructor.
 */
public BotCommandJsonMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(BotCommand.class, BotCommandSerializer.getInstance());
  module.addSerializer(HttpFloodAttack.class, HttpFloodAttackSerializer.getInstance());
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addDeserializer(BotCommand.class, BotCommandDeserializer.getInstance());
  module.addDeserializer(HttpFloodAttack.class, HttpFloodAttackDeserializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:15,代码来源:BotCommandJsonMapper.java

示例6: FloodAttackJsonMapper

/**
 * Initializes the JSON constructor.
 */
public FloodAttackJsonMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addSerializer(HttpFloodAttack.class, HttpFloodAttackSerializer.getInstance());
  module.addDeserializer(HttpFloodAttack.class, HttpFloodAttackDeserializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:11,代码来源:FloodAttackJsonMapper.java

示例7: SimpleReportJsonMapper

/**
 * Initializes the JSON constructor.
 */
public SimpleReportJsonMapper() {
  super();
  SimpleModule module = new SimpleModule();
  module.addDeserializer(SimpleReport.class, SimpleReportDeserializer.getInstance());
  module.addDeserializer(AppConfiguration.class, AppConfigurationDeserializer.getInstance());
  module.addDeserializer(Controller.class, ControllerDeserializer.getInstance());
  module.addDeserializer(HttpFloodAttack.class, HttpFloodAttackDeserializer.getInstance());
  module.addSerializer(SimpleReport.class, SimpleReportSerializer.getInstance());
  module.addSerializer(AppConfiguration.class, AppConfigurationSerializer.getInstance());
  module.addSerializer(Controller.class, ControllerSerializer.getInstance());
  module.addSerializer(HttpFloodAttack.class, HttpFloodAttackSerializer.getInstance());
  super.registerModule(module);
  super.enable(SerializationFeature.INDENT_OUTPUT);
}
 
开发者ID:braineering,项目名称:ares,代码行数:17,代码来源:SimpleReportJsonMapper.java


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