Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

groovy string to json

def output = new groovy.json.JsonOutput()
def testString = "test_string"

println output.toJson(testString) // outputs valid JSON: "test_string"
 
PREVIOUS NEXT
Tagged: #groovy #string #json
ADD COMMENT
Topic
Name
9+3 =