當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。