Package de.marhali.json5.config
Class Json5Options
- java.lang.Object
-
- de.marhali.json5.config.Json5Options
-
public final class Json5Options extends java.lang.ObjectDefinition of all configuration options for parsing and writing Json5 data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJson5Options.Builder
-
Field Summary
Fields Modifier and Type Field Description static Json5OptionsDEFAULTRecommended default configuration options.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Json5Options.Builderbuilder()Configure options using the builder pattern.booleanequals(java.lang.Object o)DigitSeparatorStrategygetDigitSeparatorStrategy()DuplicateKeyStrategygetDuplicateBehaviour()intgetIndentFactor()inthashCode()booleanisAllowBinaryLiterals()booleanisAllowHexFloatingLiterals()booleanisAllowInfinity()booleanisAllowInvalidSurrogates()booleanisAllowLongUnicodeEscapes()booleanisAllowNaN()booleanisAllowOctalLiterals()booleanisAllowTrailingData()booleanisInsertFinalNewline()booleanisParseComments()booleanisQuoteless()booleanisQuoteSingle()booleanisStringifyAscii()booleanisStringifyUnixInstants()booleanisTrailingComma()booleanisWriteComments()
-
-
-
Field Detail
-
DEFAULT
public static Json5Options DEFAULT
Recommended default configuration options.Defaults:
- allowNaN:
true - allowInfinity:
true - allowInvalidSurrogates:
true - quoteless:
true - parseComments:
true - writeComments:
true - trailingComma:
true - digitSeparatorStrategy:
NONE - duplicateKeyStrategy:
UNIQUE - prettyPrinting:
true
- allowNaN:
-
-
Method Detail
-
builder
public static Json5Options.Builder builder()
Configure options using the builder pattern.- Returns:
- builder
-
isStringifyUnixInstants
public boolean isStringifyUnixInstants()
-
isStringifyAscii
public boolean isStringifyAscii()
-
isAllowNaN
public boolean isAllowNaN()
-
isAllowInfinity
public boolean isAllowInfinity()
-
isAllowInvalidSurrogates
public boolean isAllowInvalidSurrogates()
-
isQuoteSingle
public boolean isQuoteSingle()
-
isQuoteless
public boolean isQuoteless()
-
isAllowBinaryLiterals
public boolean isAllowBinaryLiterals()
-
isAllowOctalLiterals
public boolean isAllowOctalLiterals()
-
isAllowHexFloatingLiterals
public boolean isAllowHexFloatingLiterals()
-
isAllowLongUnicodeEscapes
public boolean isAllowLongUnicodeEscapes()
-
isAllowTrailingData
public boolean isAllowTrailingData()
-
isWriteComments
public boolean isWriteComments()
-
isParseComments
public boolean isParseComments()
-
isTrailingComma
public boolean isTrailingComma()
-
isInsertFinalNewline
public boolean isInsertFinalNewline()
-
getDigitSeparatorStrategy
public DigitSeparatorStrategy getDigitSeparatorStrategy()
-
getDuplicateBehaviour
public DuplicateKeyStrategy getDuplicateBehaviour()
-
getIndentFactor
public int getIndentFactor()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-