You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2016/01/20 19:28:50 UTC

groovy git commit: Documentation: Json userguide: correct attribution of `prettyPrint` method and wording of comment about it taking a normal String (closes #246)

Repository: groovy
Updated Branches:
  refs/heads/master d37e7bc51 -> 94b8082d1


Documentation: Json userguide: correct attribution of `prettyPrint` method and wording of comment about it taking a normal String (closes #246)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/94b8082d
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/94b8082d
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/94b8082d

Branch: refs/heads/master
Commit: 94b8082d179f0188273882041b99904156cdc506
Parents: d37e7bc
Author: Marc Paquette <ma...@mac.com>
Authored: Wed Jan 20 11:57:35 2016 -0500
Committer: pascalschumacher <pa...@gmx.net>
Committed: Wed Jan 20 19:27:33 2016 +0100

----------------------------------------------------------------------
 subprojects/groovy-json/src/spec/doc/json-userguide.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/94b8082d/subprojects/groovy-json/src/spec/doc/json-userguide.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/spec/doc/json-userguide.adoc b/subprojects/groovy-json/src/spec/doc/json-userguide.adoc
index 08a4531..5557568 100644
--- a/subprojects/groovy-json/src/spec/doc/json-userguide.adoc
+++ b/subprojects/groovy-json/src/spec/doc/json-userguide.adoc
@@ -176,7 +176,7 @@ has support for serialising POGOs, that is, plain-old Groovy objects.
 include::{rootProjectDir}/subprojects/groovy-json/src/spec/test/json/JsonTest.groovy[tags=json_output_pogo,indent=0]
 ----
 
-As we saw in previous examples, the JSON output is not pretty printed per default. However, the `prettyPrint` method in `JsonSlurper` comes
+As we saw in previous examples, the JSON output is not pretty printed per default. However, the `prettyPrint` method in `JsonOutput` comes
 to rescue for this task.
 
 [source,groovy]
@@ -184,8 +184,8 @@ to rescue for this task.
 include::{rootProjectDir}/subprojects/groovy-json/src/spec/test/json/JsonTest.groovy[tags=pretty_print,indent=0]
 ----
 
-`prettyPrint` takes a `String` as single parameter. It must not be used in conjunction with the other `JsonOutput` methods,
-it can be applied on arbitrary JSON `String` instances.
+`prettyPrint` takes a `String` as single parameter; therefore, it can be applied on arbitrary JSON `String` instances, not only the result of
+`JsonOutput.toJson`.
 
 Another way to create JSON from Groovy is to use `JsonBuilder` or `StreamingJsonBuilder`. Both builders provide a
 DSL which allows to formulate an object graph which is then converted to JSON.