java.lang.Object
org.zalando.logbook.json.JsonBodyFilters
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.zalando.logbook.BodyFilterstatic org.zalando.logbook.BodyFilterreplaceJsonNumberProperty(Predicate<String> predicate, Number replacement) static org.zalando.logbook.BodyFilterreplaceJsonNumberProperty(Set<String> properties, Number replacement) static org.zalando.logbook.BodyFilterreplaceJsonStringProperty(Predicate<String> predicate, String replacement) static org.zalando.logbook.BodyFilterreplaceJsonStringProperty(Set<String> properties, String replacement) Creates aBodyFilterthat replaces the properties in the json response with the replacement passed as argument.static org.zalando.logbook.BodyFilterreplacePrimitiveJsonProperty(Predicate<String> predicate, String replacement) static org.zalando.logbook.BodyFilterreplacePrimitiveJsonProperty(Predicate<String> predicate, BiFunction<String, String, String> replacement)
-
Method Details
-
accessToken
@API(status=MAINTAINED) public static org.zalando.logbook.BodyFilter accessToken() -
replaceJsonStringProperty
@API(status=MAINTAINED) public static org.zalando.logbook.BodyFilter replaceJsonStringProperty(Set<String> properties, String replacement) Creates aBodyFilterthat replaces the properties in the json response with the replacement passed as argument. ThisBodyFilterworks on all levels inside the json tree and it only works with string values
Example fromAccessTokenBodyFiltermethod:
Set<String> properties = new HashSet<>(); properties.add("access_token"); properties.add("open_id"); properties.add("id_token"); return replaceJsonStringProperty(properties, "XXX");- Parameters:
properties- JSON properties to replacereplacement- String to replace the properties values- Returns:
- BodyFilter generated
-
replaceJsonStringProperty
-
replaceJsonNumberProperty
-
replaceJsonNumberProperty
-
replacePrimitiveJsonProperty
-
replacePrimitiveJsonProperty
-