java.lang.Object
at.syntaxerror.json5.JSONOptions.JSONOptionsBuilder
- Enclosing class:
JSONOptions
-
Method Summary
Modifier and TypeMethodDescriptionallowInfinity(boolean allowInfinity) WhetherInfinityshould be allowed as a number.allowInvalidSurrogates(boolean allowInvalidSurrogates) Whether invalid unicode surrogate pairs should be allowedallowNaN(boolean allowNaN) WhetherNaNshould be allowed as a numberbuild()parseInstants(boolean parseInstants) Whether instants should be parsed as such.parseStringInstants(boolean parseStringInstants) Whether string instants (according to RFC 3339, Section 5.6) should be parsed as such.parseUnixInstants(boolean parseUnixInstants) Whether unix instants (integers) should be parsed as such.quoteSingle(boolean quoteSingle) Whether strings should be single-quoted (') instead of double-quoted (").stringifyUnixInstants(boolean stringifyUnixInstants) Whether instants should be stringifyed as unix timestamps.toString()
-
Method Details
-
parseInstants
Whether instants should be parsed as such. If this isfalse,JSONOptions.isParseStringInstants()andJSONOptions.isParseUnixInstants()are ignoredDefault:
trueThis is a
Parser-only option- Parameters:
parseInstants- a boolean- Returns:
this.- Since:
- 1.1.0
-
parseStringInstants
Whether string instants (according to RFC 3339, Section 5.6) should be parsed as such. Ignored ifJSONOptions.isParseInstants()isfalseDefault:
trueThis is a
Parser-only option- Parameters:
parseStringInstants- a boolean- Returns:
this.- Since:
- 1.1.0
-
parseUnixInstants
Whether unix instants (integers) should be parsed as such. Ignored ifJSONOptions.isParseInstants()isfalseDefault:
trueThis is a
Parser-only option- Parameters:
parseUnixInstants- a boolean- Returns:
this.- Since:
- 1.1.0
-
stringifyUnixInstants
Whether instants should be stringifyed as unix timestamps. If this isfalse, instants will be stringifyed as strings (according to RFC 3339, Section 5.6).Default:
falseThis is a
Stringify-only option- Parameters:
stringifyUnixInstants- a boolean- Returns:
this.- Since:
- 1.1.0
-
allowNaN
WhetherNaNshould be allowed as a numberDefault:
true- Parameters:
allowNaN- a boolean- Returns:
this.- Since:
- 1.1.0
-
allowInfinity
WhetherInfinityshould be allowed as a number. This applies to both+Infinityand-InfinityDefault:
true- Parameters:
allowInfinity- a boolean- Returns:
this.- Since:
- 1.1.0
-
allowInvalidSurrogates
Whether invalid unicode surrogate pairs should be allowedDefault:
trueThis is a
Parser-only option- Parameters:
allowInvalidSurrogates- a boolean- Returns:
this.- Since:
- 1.1.0
-
quoteSingle
Whether strings should be single-quoted (') instead of double-quoted ("). This also includes aJSONObject'smember namesDefault:
falseThis is a
Stringify-only option- Parameters:
quoteSingle- a boolean- Returns:
this.- Since:
- 1.1.0
-
build
-
toString
-