Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: adding doc for jsonBuilder.write(out)

...

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.

...