Package com.azure.json
Class JsonOptions
java.lang.Object
com.azure.json.JsonOptions
Contains configuration options for creating a
JsonReader or JsonWriter.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether JSONC (JSON with comments) is supported.booleanWhether non-numeric numbers such asNaN,Infinity,+Infinityand-Infinityare supported.setJsoncSupported(boolean jsoncSupported) Sets whether JSONC (JSON with comments) is supported.setNonNumericNumbersSupported(boolean nonNumericNumbersSupported) Whether non-numeric numbers such asNaN,Infinity,+Infinityand-Infinityare supported.
-
Constructor Details
-
JsonOptions
public JsonOptions()Creates an instance ofJsonOptions.
-
-
Method Details
-
isNonNumericNumbersSupported
public boolean isNonNumericNumbersSupported()Whether non-numeric numbers such asNaN,Infinity,+Infinityand-Infinityare supported.By default, this is configured to true.
- Returns:
- Whether non-numeric numbers are supported.
-
setNonNumericNumbersSupported
Whether non-numeric numbers such asNaN,Infinity,+Infinityand-Infinityare supported.By default, this is configured to true.
- Parameters:
nonNumericNumbersSupported- Whether non-numeric numbers are supported.- Returns:
- The updated JsonOptions object.
-
isJsoncSupported
public boolean isJsoncSupported()Whether JSONC (JSON with comments) is supported. By default, this is configured to false.- Returns:
- Whether JSONC is supported.
-
setJsoncSupported
Sets whether JSONC (JSON with comments) is supported. By default, this is configured to false.- Parameters:
jsoncSupported- Whether JSONC is supported.- Returns:
- The updated JsonOptions object.
-