public final class JsonBodyFilters extends Object
| Modifier and Type | Method and Description |
|---|---|
static BodyFilter |
accessToken() |
static BodyFilter |
replaceJsonNumberProperty(Set<String> properties,
Number replacement) |
static BodyFilter |
replaceJsonStringProperty(Set<String> properties,
String replacement)
Creates a
BodyFilter that replaces the properties in the json response with the replacement passed as argument. |
@API(status=MAINTAINED) public static BodyFilter accessToken()
@API(status=MAINTAINED) public static BodyFilter replaceJsonStringProperty(Set<String> properties, String replacement)
BodyFilter that replaces the properties in the json response with the replacement passed as argument.
This BodyFilter works on all levels inside the json tree and it only works with string valuesAccessTokenBodyFilter method:
Set<String> properties = new HashSet<>();
properties.add("access_token");
properties.add("open_id");
properties.add("id_token");
return replaceJsonStringProperty(properties, "XXX");
properties - JSON properties to replacereplacement - String to replace the properties values@API(status=EXPERIMENTAL) public static BodyFilter replaceJsonNumberProperty(Set<String> properties, Number replacement)
Copyright © 2015–2019 Zalando SE. All rights reserved.