Groovy web console

subscribe to the feed Subscribe
to this
site

JsonOutput

Published 6 months ago by Biba
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.JsonOutput
desc = """Line 1
Line 2
Line 3
"""
obj = ["desc":desc, "title": "test"]
println(JsonOutput.toJson(obj))