THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
out.write jsonBuilder.json { text currentNode.getProperty("text").string } as String |
This can be simplified by using JSONGroovyBuilder
's write
method:
Code Block |
---|
jsonBuilder.write(out).json {
}
|
Examples
These examples are taken from the test case: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/json/src/test/groovy/org/apache/sling/commons/json/groovy/JSONGroovyBuilderTest.groovy?view=markup.
...