java.lang.Object
java.lang.Enum<FlattenMode>
com.github.wnameless.json.flattener.FlattenMode
All Implemented Interfaces:
Serializable, Comparable<FlattenMode>, Constable

public enum FlattenMode extends Enum<FlattenMode>
FlattenMode lists all acceptable modes of the JsonFlattener.
Author:
Wei-Ming Wu
  • Enum Constant Details

    • NORMAL

      public static final FlattenMode NORMAL
      Flattens every object.
    • KEEP_ARRAYS

      public static final FlattenMode KEEP_ARRAYS
      Flattens every object except arrays.
    • MONGODB

      public static final FlattenMode MONGODB
      Conforms to MongoDB dot.notation to update also nested documents.
    • KEEP_PRIMITIVE_ARRAYS

      public static final FlattenMode KEEP_PRIMITIVE_ARRAYS
      Flattens every object except arrays which contain only primitive types(strings, numbers, booleans, and null).
  • Method Details

    • values

      public static FlattenMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FlattenMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null