public abstract class Modifier extends java.lang.Object implements SpecDriven, ContextualTransform
Modifier and Type | Class and Description |
---|---|
static class |
Modifier.Defaultr
This variant of modifier only writes when the key/index is missing or the value is null
|
static class |
Modifier.Definr
This variant of modifier only writes when the key/index is missing
|
static class |
Modifier.Overwritr
This variant of modifier creates the key/index is missing,
and overwrites the value if present
|
Modifier and Type | Field and Description |
---|---|
private ModifierCompositeSpec |
rootSpec |
private static java.util.Map<java.lang.String,Function> |
STOCK_FUNCTIONS |
ROOT_KEY
Modifier | Constructor and Description |
---|---|
private |
Modifier(java.lang.Object spec,
OpMode opMode,
java.util.Map<java.lang.String,Function> functionsMap) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
transform(java.lang.Object input,
java.util.Map<java.lang.String,java.lang.Object> context)
Execute a transform on some input JSON with optionally provided "context" and return the result.
|
private static final java.util.Map<java.lang.String,Function> STOCK_FUNCTIONS
private final ModifierCompositeSpec rootSpec
public java.lang.Object transform(java.lang.Object input, java.util.Map<java.lang.String,java.lang.Object> context)
ContextualTransform
transform
in interface ContextualTransform
input
- the JSON object to transform in plain vanilla Jackson Mapcontext
- information outside of the input JSON that needs to be taken into account when doing the transform