Class JsonTransformer<T>
java.lang.Object
software.amazon.lambda.powertools.parameters.transform.JsonTransformer<T>
- Type Parameters:
T- type of the Object to create during transformation.
- All Implemented Interfaces:
Transformer<T>
Transformer that transform a json string into an Object. Based on Jackson.
-
Field Summary
Fields inherited from interface software.amazon.lambda.powertools.parameters.transform.Transformer
base64, json -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyTransformation(String value, Class<T> targetClass) Apply a transformation on the input value (String)
-
Constructor Details
-
JsonTransformer
public JsonTransformer()
-
-
Method Details
-
applyTransformation
Description copied from interface:TransformerApply a transformation on the input value (String)- Specified by:
applyTransformationin interfaceTransformer<T>- Parameters:
value- the parameter value to transformtargetClass- class of the target object- Returns:
- a transformed parameter
- Throws:
TransformationException- when a transformation error occurs
-