public static JsonNode stringToJsonNode(String paramName, String val) {
        if (val == null) {
            return null;
        }
        try {
            return MAPPER.readTree(val);
        } catch (IOException e) {
            throw new SdkClientException(paramName + " must be a valid JSON document", e);
        }
    }
Converts a String containing a JSON document into a {@link JsonNode}.

@param paramName Param name to use in exception message.
@param val String JSON document.
@return JsonNode representing document.
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/JacksonUtils.java