Class JSONParserOptions
java.lang.Object
org.apache.sling.contentparser.api.ParserOptions
org.apache.sling.contentparser.json.JSONParserOptions
@ConsumerType
public final class JSONParserOptions
extends org.apache.sling.contentparser.api.ParserOptions
Defines specific JSON parser options which can be used with the JSON
ContentParser
implementations provided by this bundle.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<JSONParserFeature>
List of JSON parser features activated by default.Fields inherited from class org.apache.sling.contentparser.api.ParserOptions
DEFAULT_IGNORE_RESOURCE_NAMES, DEFAULT_PRIMARY_TYPE, DEFAULT_REMOVE_PROPERTY_NAME_PREFIXES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of the features encapsulated by this instance.withFeatures
(Set<JSONParserFeature> value) Set the features the JSON parser should apply when parsing files.withFeatures
(JSONParserFeature... value) Set the features the JSON parser should apply when parsing files.Methods inherited from class org.apache.sling.contentparser.api.ParserOptions
defaultPrimaryType, detectCalendarValues, getDefaultPrimaryType, getIgnorePropertyNames, getIgnoreResourceNames, getRemovePropertyNamePrefixes, ignorePropertyNames, ignoreResourceNames, isDetectCalendarValues, removePropertyNamePrefixes
-
Field Details
-
DEFAULT_JSON_PARSER_FEATURES
List of JSON parser features activated by default.
-
-
Constructor Details
-
JSONParserOptions
public JSONParserOptions()
-
-
Method Details
-
withFeatures
Set the features the JSON parser should apply when parsing files.- Parameters:
value
- JSON parser features- Returns:
- this
-
withFeatures
Set the features the JSON parser should apply when parsing files.- Parameters:
value
- JSON parser features- Returns:
- this
-
getFeatures
Returns a copy of the features encapsulated by this instance. For modifying the set of features please use thewithFeatures
fluid methods.- Returns:
- the features the JSON parser should apply when parsing files
-