Class 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

      Fields 
      Modifier and Type Field Description
      static java.util.Set<JSONParserFeature> DEFAULT_JSON_PARSER_FEATURES
      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
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
    • Constructor Detail

      • JSONParserOptions

        public JSONParserOptions()
    • 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 the withFeatures fluid methods.
        Returns:
        the features the JSON parser should apply when parsing files