From 5616ac2ab066d45a735e4e137daafcee5423edca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj-S=C3=B6ren=20Mossdorf?= Date: Thu, 19 Mar 2020 14:46:56 +0100 Subject: [PATCH] Parse values to json with groovy methods (#1266) Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> --- vars/commonPipelineEnvironment.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/commonPipelineEnvironment.groovy b/vars/commonPipelineEnvironment.groovy index 2f035ee82..912175994 100644 --- a/vars/commonPipelineEnvironment.groovy +++ b/vars/commonPipelineEnvironment.groovy @@ -2,7 +2,7 @@ import com.sap.piper.ConfigurationLoader import com.sap.piper.ConfigurationMerger import com.sap.piper.DefaultValueCache import com.sap.piper.analytics.InfluxData -import com.sap.piper.JsonUtils +import groovy.json.JsonOutput class commonPipelineEnvironment implements Serializable { @@ -180,7 +180,7 @@ class commonPipelineEnvironment implements Serializable { if(value instanceof String) { script.writeFile file: fileName, text: value } else { - script.writeFile file: fileName, text: JsonUtils.groovyObjectToJsonString(value) + script.writeFile file: fileName, text: groovy.json.JsonOutput.toJson(value) } } }) @@ -191,7 +191,7 @@ class commonPipelineEnvironment implements Serializable { if(value instanceof String) { script.writeFile file: fileName, text: value } else { - script.writeFile file: fileName, text: JsonUtils.groovyObjectToJsonString(value) + script.writeFile file: fileName, text: groovy.json.JsonOutput.toJson(value) } } })