Enum Class JSONOutputFormats

java.lang.Object
java.lang.Enum<JSONOutputFormats>
org.webpki.json.JSONOutputFormats
All Implemented Interfaces:
Serializable, Comparable<JSONOutputFormats>, Constable

public enum JSONOutputFormats extends Enum<JSONOutputFormats>
JSON output formats. JSON tokens are always formatted according to JCS (RFC 8785). Original property order is always maintained, unless otherwise noted. This enumeration is used by JSONObjectWriter.
  • Enum Constant Details

    • NORMALIZED

      public static final JSONOutputFormats NORMALIZED
      As a string without whitespace compatible with ECMAScript's JSON.stringify().
    • CANONICALIZED

      public static final JSONOutputFormats CANONICALIZED
      JCS (RFC 8785) compatible formatting. That is, properties are sorted as well.
    • PRETTY_JS_NATIVE

      public static final JSONOutputFormats PRETTY_JS_NATIVE
      Pretty-printed with JavaScript syntax.
    • PRETTY_PRINT

      public static final JSONOutputFormats PRETTY_PRINT
      Pretty-printed.
    • PRETTY_HTML

      public static final JSONOutputFormats PRETTY_HTML
      Pretty-printed with HTML format.
  • Method Details

    • values

      public static JSONOutputFormats[] 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 JSONOutputFormats 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