Fixed #3 Having empty String breaks JSON parsing

This commit is contained in:
Jakub Kubrynski
2015-01-28 21:48:09 +01:00
parent 7386fbc519
commit 0ea55320ce

View File

@@ -28,9 +28,9 @@ class StubMappingConverter {
}
static def transformValue(def value, Closure closure) {
if (value instanceof String) {
if (value instanceof String && value) {
try {
def json = new JsonSlurper().parseText(value as String)
def json = new JsonSlurper().parseText(value)
if (json instanceof Map) {
return convertPlaceholders(json, closure)
}