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 Details

    • DEFAULT_JSON_PARSER_FEATURES

      public static final Set<JSONParserFeature> DEFAULT_JSON_PARSER_FEATURES
      List of JSON parser features activated by default.
  • Constructor Details

    • JSONParserOptions

      public JSONParserOptions()
  • Method Details

    • withFeatures

      public JSONParserOptions withFeatures(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 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