Add a JSON object passing mechanism

This commit is contained in:
Dan Hawkins 2021-11-16 17:50:25 +00:00
commit 2f65f299fb

View file

@ -1,22 +1,22 @@
def sominfo = null
def sominfostore = null
def String asJsonText() {
return writeJSON(returnText: true, json: sominfo, pretty: 1)
return writeJSON(returnText: true, json: sominfostore, pretty: 1)
}
def boolean isSet() {
return (sominfo != null)
return (sominfostore != null)
}
def set(String jsontext) {
sominfo = readJSON(text: jsontext)
sominfostore = readJSON(text: jsontext)
def som_support_json_text = writeJSON(returnText: true, json: sominfo, pretty: 1)
def som_support_json_text = writeJSON(returnText: true, json: sominfostore, pretty: 1)
echo "Som support info:\n${asJsonText()}"
}
def get() {
return sominfo
return sominfostore
}
return this