Package org.tomlj
Enum Class JsonOptions
- All Implemented Interfaces:
Serializable
,Comparable<JsonOptions>
,Constable
Options for serializing TOML to JSON.
These options are suitable for use with `toJson` methods, e.g. TomlTable.toJson(JsonOptions...)
,
TomlArray.toJson(JsonOptions...)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOutput all values as strings, rather than using integer, float or boolean values.Output values as objects including a "type" and "value" property. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static EnumSet
<JsonOptions> setFrom
(JsonOptions[] options) static JsonOptions
Returns the enum constant of this class with the specified name.static JsonOptions[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VALUES_AS_OBJECTS_WITH_TYPE
Output values as objects including a "type" and "value" property. E.g.:{ "type": "string", "value": "hello world" }
-
ALL_VALUES_AS_STRINGS
Output all values as strings, rather than using integer, float or boolean values.
-
-
Constructor Details
-
JsonOptions
private JsonOptions()
-
-
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
-
setFrom
-