groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject groovy git commit: Documentation: Json userguide: correct attribution of `prettyPrint` method and wording of comment about it taking a normal String (closes #246)
Date Wed, 20 Jan 2016 18:29:30 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X f6d518656 -> 15959a4b9


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/15959a4b
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/15959a4b
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/15959a4b

Branch: refs/heads/GROOVY_2_4_X
Commit: 15959a4b9725b3396d0f991c36a3f8e3c7509127
Parents: f6d5186
Author: Marc Paquette <marcpa@mac.com>
Authored: Wed Jan 20 11:57:35 2016 -0500
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Wed Jan 20 19:29:15 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/15959a4b/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.


Mime
View raw message