Package com.badlogic.gdx.utils
Enum JsonWriter.OutputType
- java.lang.Object
-
- java.lang.Enum<JsonWriter.OutputType>
-
- com.badlogic.gdx.utils.JsonWriter.OutputType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JsonWriter.OutputType>
- Enclosing class:
- JsonWriter
public static enum JsonWriter.OutputType extends java.lang.Enum<JsonWriter.OutputType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description javascriptLike JSON, but names are only double quoted if necessary.jsonNormal JSON, with all its double quotes.minimalLike JSON, but: Names only require double quotes if they start withspaceor any of":,}/or they contain//or/*or:.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringquoteName(java.lang.String value)java.lang.StringquoteValue(java.lang.Object value)static JsonWriter.OutputTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static JsonWriter.OutputType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
json
public static final JsonWriter.OutputType json
Normal JSON, with all its double quotes.
-
javascript
public static final JsonWriter.OutputType javascript
Like JSON, but names are only double quoted if necessary.
-
minimal
public static final JsonWriter.OutputType minimal
Like JSON, but:- Names only require double quotes if they start with
spaceor any of":,}/or they contain//or/*or:. - Values only require double quotes if they start with
spaceor any of":,{[]/or they contain//or/*or any of}],or they are equal totrue,false, ornull. - Newlines are treated as commas, making commas optional in many cases.
- C style comments may be used:
//...or/*...*/
- Names only require double quotes if they start with
-
-
Method Detail
-
values
public static JsonWriter.OutputType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JsonWriter.OutputType c : JsonWriter.OutputType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonWriter.OutputType valueOf(java.lang.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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
quoteValue
public java.lang.String quoteValue(java.lang.Object value)
-
quoteName
public java.lang.String quoteName(java.lang.String value)
-
-