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 JSONContentParser
implementations provided by this bundle.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<JSONParserFeature>
DEFAULT_JSON_PARSER_FEATURES
List of JSON parser features activated by default.
-
Constructor Summary
Constructors Constructor Description JSONParserOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<JSONParserFeature>
getFeatures()
Returns a copy of the features encapsulated by this instance.JSONParserOptions
withFeatures(java.util.Set<JSONParserFeature> value)
Set the features the JSON parser should apply when parsing files.JSONParserOptions
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 Detail
-
DEFAULT_JSON_PARSER_FEATURES
public static final java.util.Set<JSONParserFeature> DEFAULT_JSON_PARSER_FEATURES
List of JSON parser features activated by default.
-
-
Method Detail
-
withFeatures
public JSONParserOptions withFeatures(java.util.Set<JSONParserFeature> value)
Set the features the JSON parser should apply when parsing files.- Parameters:
value
- JSON parser features- Returns:
- this
-
withFeatures
public JSONParserOptions withFeatures(JSONParserFeature... value)
Set the features the JSON parser should apply when parsing files.- Parameters:
value
- JSON parser features- Returns:
- this
-
getFeatures
public java.util.Set<JSONParserFeature> 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
-
-