Skip to content

Commit

Permalink
Fix reference to XContentBuilder.string() (#31337)
Browse files Browse the repository at this point in the history
In 6.3 this was moved to `Strings.toString(XContentBuilder)` as part of the
XContent extraction. This commit fixes the docs to reference the new method.

Resolves #31326
  • Loading branch information
dakrone authored Jun 18, 2018
1 parent 2a8381d commit 4ad334f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/java-api/docs/index_.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ Note that you can also add arrays with `startArray(String)` and
other XContentBuilder objects.

If you need to see the generated JSON content, you can use the
`string()` method.
`Strings.toString()` method.

[source,java]
--------------------------------------------------
String json = builder.string();
import org.elasticsearch.common.Strings;
String json = Strings.toString(builder);
--------------------------------------------------


Expand Down

0 comments on commit 4ad334f

Please sign in to comment.