From 285e70c43ea05fa6a6f1daaebdd33d6632986517 Mon Sep 17 00:00:00 2001 From: LHearen Date: Fri, 30 Aug 2019 10:58:55 +0800 Subject: [PATCH 1/2] fix a wrong guide tip `builder.getOutputStream().toString()` will do the trick while `builder.string()` only prints the object reference (kind of address) --- docs/java-api/docs/index_.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java-api/docs/index_.asciidoc b/docs/java-api/docs/index_.asciidoc index b32955d9d4f50..f56844d4a8acf 100644 --- a/docs/java-api/docs/index_.asciidoc +++ b/docs/java-api/docs/index_.asciidoc @@ -103,7 +103,7 @@ If you need to see the generated JSON content, you can use the [source,java] -------------------------------------------------- -String json = builder.string(); +String json = builder.getOutputStream().toString(); -------------------------------------------------- From 1cc3f8c0a5456a9e95dd5de2bd541322626baeee Mon Sep 17 00:00:00 2001 From: LHearen Date: Mon, 23 Sep 2019 11:40:56 +0800 Subject: [PATCH 2/2] Update index_.asciidoc --- docs/java-api/docs/index_.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java-api/docs/index_.asciidoc b/docs/java-api/docs/index_.asciidoc index f56844d4a8acf..a5044126dde2c 100644 --- a/docs/java-api/docs/index_.asciidoc +++ b/docs/java-api/docs/index_.asciidoc @@ -103,7 +103,7 @@ If you need to see the generated JSON content, you can use the [source,java] -------------------------------------------------- -String json = builder.getOutputStream().toString(); +String json = Strings.toString(builder); --------------------------------------------------