public abstract class JsonContentModifier extends Object implements org.springframework.restdocs.operation.preprocess.ContentModifier
| Constructor and Description |
|---|
JsonContentModifier(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
modifyContent(byte[] originalContent)
Uses UTF-8.
|
byte[] |
modifyContent(byte[] originalContent,
org.springframework.http.MediaType contentType) |
protected abstract void |
modifyJson(com.fasterxml.jackson.databind.JsonNode root) |
protected void |
walk(com.fasterxml.jackson.databind.JsonNode node,
JsonNodeFilter filter,
JsonNodeConsumer consumer) |
public JsonContentModifier(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public byte[] modifyContent(byte[] originalContent,
org.springframework.http.MediaType contentType)
modifyContent in interface org.springframework.restdocs.operation.preprocess.ContentModifierprotected byte[] modifyContent(byte[] originalContent)
JsonEncoding
only UTF-{8,16,32} are a valid JSON encodings.originalContent - original JSON contentprotected abstract void modifyJson(com.fasterxml.jackson.databind.JsonNode root)
protected void walk(com.fasterxml.jackson.databind.JsonNode node,
JsonNodeFilter filter,
JsonNodeConsumer consumer)
Copyright © 2018 Scalable Capital GmbH. All rights reserved.