Code example for Excluder

Methods: withExclusionStrategy

0
   * @param strategy an exclusion strategy to apply during deserialization. 
   * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern 
   * @since 1.7 
   */ 
  public GsonBuilder addDeserializationExclusionStrategy(ExclusionStrategy strategy) {
    excluder = excluder.withExclusionStrategy(strategy, false, true);
    return this;
  } 
 
  /** 
   * Configures Gson to output Json that fits in a page for pretty printing. This option only 
   * affects Json serialization. 
   * 
   * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern 
   */ 
  public GsonBuilder setPrettyPrinting() {
    prettyPrinting = true;
    return this;
  }