Package org.webpki.json
Enum Class JSONOutputFormats
- All Implemented Interfaces:
Serializable
,Comparable<JSONOutputFormats>
,Constable
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
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionJCS (RFC 8785) compatible formatting.As a string without whitespace compatible with ECMAScript'sJSON.stringify()
.Pretty-printed with HTML format.Pretty-printed with JavaScript syntax.Pretty-printed. -
Method Summary
Modifier and TypeMethodDescriptionstatic JSONOutputFormats
Returns the enum constant of this class with the specified name.static JSONOutputFormats[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMALIZED
As a string without whitespace compatible with ECMAScript'sJSON.stringify()
. -
CANONICALIZED
JCS (RFC 8785) compatible formatting. That is, properties are sorted as well. -
PRETTY_JS_NATIVE
Pretty-printed with JavaScript syntax. -
PRETTY_PRINT
Pretty-printed. -
PRETTY_HTML
Pretty-printed with HTML format.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-