Enum ParamFormat

All Implemented Interfaces:
Serializable, Comparable<ParamFormat>, java.lang.constant.Constable

public enum ParamFormat extends Enum<ParamFormat>
Identifies the possible values for the UonSerializer.Builder.paramFormat(ParamFormat) setting.
See Also:
  • Enum Constant Details

    • UON

      public static final ParamFormat UON
      Use UON notation for values.

      String values such as "(foo='bar')" will end up being quoted and escaped to "'(foo=bar~'baz~')'".

      Boolean strings ("true"/"false") and numeric values ("123") will also end up quoted ("'true'", "'false'", "'123'".


      public static final ParamFormat PLAINTEXT
      Serialize as plain text.

      Strings will never be quoted or escaped.
      Maps and array constructs ("(...)", "@(...)") will never be used.

      Note that this can cause errors during parsing if you're using the URL-encoding parser to parse the results since UON constructs won't be differentiable.
      However, this is not an issue if you're simply creating queries or form posts against 3rd-party interfaces.

  • Method Details

    • values

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

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