diff --git a/docs/java-api/index_.asciidoc b/docs/java-api/index_.asciidoc index 42455b168bb..315bf9be639 100644 --- a/docs/java-api/index_.asciidoc +++ b/docs/java-api/index_.asciidoc @@ -45,8 +45,7 @@ String json = "{" + [[using-map]] ==== Using Map -Map is a key:values pair collection. It represents very well a JSON -structure: +Map is a key:values pair collection. It represents a JSON structure: [source,java] -------------------------------------------------- @@ -87,7 +86,7 @@ import com.fasterxml.jackson.databind.*; ObjectMapper mapper = new ObjectMapper(); // create once, reuse // generate json -String json = mapper.writeValueAsString(yourbeaninstance); +byte[] json = mapper.writeValueAsBytes(yourbeaninstance); --------------------------------------------------