diff --git a/bundles/org.openhab.transform.jsonpath/src/main/java/org/openhab/transform/jsonpath/internal/JSonPathTransformationService.java b/bundles/org.openhab.transform.jsonpath/src/main/java/org/openhab/transform/jsonpath/internal/JSonPathTransformationService.java index 91939afa968..a38bf650324 100644 --- a/bundles/org.openhab.transform.jsonpath/src/main/java/org/openhab/transform/jsonpath/internal/JSonPathTransformationService.java +++ b/bundles/org.openhab.transform.jsonpath/src/main/java/org/openhab/transform/jsonpath/internal/JSonPathTransformationService.java @@ -59,6 +59,10 @@ public class JSonPathTransformationService implements TransformationService { logger.debug("about to transform '{}' by the function '{}'", source, jsonPathExpression); + if (source.isBlank()) { + // return null if source is empty/blank, JSONPath will throw an IAE on empty input strings + return null; + } try { Object transformationResult = JsonPath.read(source, jsonPathExpression); logger.debug("transformation resulted in '{}'", transformationResult);