001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.databind.io;
007
008import gov.nist.secauto.metaschema.core.configuration.AbstractConfigurationFeature;
009
010import edu.umd.cs.findbugs.annotations.NonNull;
011
012public final class SerializationFeature<V>
013    extends AbstractConfigurationFeature<V> {
014  /**
015   * If enabled, generate document level constructs in the underlying data format.
016   * In XML this would include XML declarations. In JSON or YAML, this would
017   * include an outer object and field with the name associated with the root
018   * node.
019   */
020  @NonNull
021  public static final SerializationFeature<Boolean> SERIALIZE_ROOT
022      = new SerializationFeature<>("serialize-root", Boolean.class, true);
023
024  private SerializationFeature(
025      @NonNull String name,
026      @NonNull Class<V> valueClass,
027      @NonNull V defaultValue) {
028    super(name, valueClass, defaultValue);
029  }
030
031}